Is there any difference between the two examples below in regards to performance or functionality?
Using shift:
sub function1 { my $varr1 = shift; my $varr2 = shift; }
Using @_
sub fun1{ my($varr1,$varr2)=@_; }
I know that the shift will modifies @_, and the assignment from @_ does not.
In reply to difference between shift and assignment by vinoth.ree
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |