use feature 'state'; sub do_stuff { state $last=999; my ($arg) = @_; if ( $arg == $last ) { print "You called me twice in a row with $arg\n"; } $last = $arg; } do_stuff($_) for 0..5,5;
In reply to Re: Need help !
by BillKSmith
in thread Need help !
by lonewolf28
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |