You could wrap it in a block:
{ my $max; while(<>) { $max = ($max >= $_ ? $max : $_); print "Max seen: $max\n"; } }
Or use a state variable (Perl 5.10 or 6 only, I believe)
| print pack("A25",pack("V*",map{1919242272+$_}(34481450,-49737472,6228,0,-285028276,6979,-1380265972))) |
In reply to Re: Avoiding Global Vars
by bv
in thread Avoiding Global Vars
by Melly
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |