In 5.10, there are static variables, introduced with keyword 'state'.
Note that in 5.10, my $x if 1 == 2 gives a warning.use 5.010; sub blabla { state $x = 0; say ++$x; } blabla; blabla; __END__ 1 2
In reply to Re: Confusion over scope of "my" vars
by JavaFan
in thread Confusion over scope of "my" vars
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |