I think the "shift" idiom caught on out of laziness, though it's not as slick with more than one argument. You can write:
Likewise, you can write:my $var1 = shift; my $var2 = shift;...
for only one argument.my ($var)=@_;
Hays
In reply to Re: shift vs @_
by hgolden
in thread shift vs @_
by Zadeh
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |