Yes and no: see shift. This is an example of Do What I Mean (DWIM). Inside a subroutine or format, shift works on @_ by default. Outside a subroutine, however, shift works on @ARGV by default.
#!perl -l @ARGV = '@ARGV'; @_ = '@_'; print '$ARGV[0] = ', shift; mysub(@_); sub mysub { print '$_[0] = ', shift; }
In reply to Re: Re: for vs. reverse
by chipmunk
in thread for vs. reverse
by Corion
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |