I'm looping for arguments in a subroutine. How can I loop and shift using the default variable $_ ?
We can do this..
sub scribble { while ( $a = shift ){ $a; # has arg } }
What I am trying to flirt with here is..
That I won't have to instance a symbol?sub scribble { while ( shift ){ $_ ; # not here! } }
( And I mean, seriously... where the #$!@& is shift output going?? Is its scope only in () ??? )
In reply to using shift and $_ in loop by leocharre
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |