Sandy has asked for the wisdom of the Perl Monks concerning the following question:
orsub myfunc($\@\@$) { my $var1 = $_[0]; my @arr1 = @{$_[1]}; my @arr2 = @{$_[2]}; my $var2 = $_[3]; }
Update: Fixed code snippet as shown by dragonchild. It was just a typo.sub myfunc($\@\@$) { my ($var1,$tmp1,$tmp2,$var2) = @_; my @arr1 = @$tmp1; my @arr2 = @$tmp2; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Need cleaner way to read @_ when dereferencing
by dragonchild (Archbishop) on Jan 14, 2004 at 16:58 UTC | |
by Roy Johnson (Monsignor) on Jan 14, 2004 at 17:29 UTC | |
by dragonchild (Archbishop) on Jan 14, 2004 at 17:44 UTC | |
by welchavw (Pilgrim) on Jan 15, 2004 at 03:28 UTC |