programming-examples/perl/Subroutine/my variable is initialized each time.pl
2019-11-15 12:59:38 +01:00

9 lines
183 B
Perl

sub incrementcount {
my $count;
return ++$count;
}
print incrementcount . "\n";
print incrementcount . "\n";
print incrementcount . "\n";
print incrementcount . "\n";