in reply to Parameters, subs and the shift function
sub test { my $number = shift; my @array1 = @{+shift}; # Shift off the reference, and derefe +rence it my @array2 = @{+shift}; # Do your stuff } test (2, \@a, \@b);
Abigail
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Parameters, subs and the shift function
by monktim (Friar) on Aug 19, 2003 at 14:42 UTC | |
by Abigail-II (Bishop) on Aug 19, 2003 at 14:55 UTC | |
by monktim (Friar) on Aug 19, 2003 at 15:02 UTC |