BrowserUk has asked for the wisdom of the Perl Monks concerning the following question:
my $p1 = shift; my $p2 = shift; my $p3 = shift;
instead of my ($p1, $p2, $p3) = @_;?
Are these totally equivalent and the differences are purely author preference?
Totally equivalent, but the @_ version didn't come along until later and there has been no reason to change it?
I am missing something subtle thats makes the difference?
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Getting parameters in subs
by Anonymous Monk on Jun 16, 2002 at 09:53 UTC | |
by BrowserUk (Patriarch) on Jun 16, 2002 at 11:45 UTC | |
Re: Getting parameters in subs
by Beatnik (Parson) on Jun 16, 2002 at 10:13 UTC | |
by TheHobbit (Pilgrim) on Jun 16, 2002 at 17:33 UTC |