sub foo { my $x if 0; print "X is ", $x++, $/; } foo() for 3 .. 5; ---- X is 0 X is 1 X is 2
In reply to Re: Making a variable in a sub retain its value between calls
by dragonchild
in thread Making a variable in a sub retain its value between calls
by crashtest
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |