programming-examples/perl/Subroutine/my variable is initialized each time.pl

9 lines
183 B
Perl
Raw Normal View History

2019-11-15 12:59:38 +01:00
sub incrementcount {
my $count;
return ++$count;
}
print incrementcount . "\n";
print incrementcount . "\n";
print incrementcount . "\n";
print incrementcount . "\n";