use strict; use warnings; { my $i; sub count { return $i++; } } printf "c: %d\n", count(); printf "c: %d\n", count(); printf "c: %d\n", count();