{ my $c = 0; sub counter { $c++; \$c } } print ${counter()}, "\n" for 1..3; ${counter()} = 0; print ${counter()}, "\n" for 1..3; ${counter()} = 99; print ${counter()}, "\n" for 1..3;