in reply to Re^3: More efficient dereferencing of a subroutine return
in thread More efficient dereferencing of a subroutine return
Is there a way to avoid this multi step operation when I have multiple return values of a sub?
Yes:
sub fillArrays { my( $r1, $r2 ) = @_; my @$r1 = qw(one two three); my @$r2 = qw(four five six seven); return; } my (@arr1,@arr2); fillArrays( \@arr1, \@arr2 );
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: More efficient dereferencing of a subroutine return
by AnomalousMonk (Archbishop) on Feb 19, 2013 at 23:26 UTC | |
by gg48gg (Sexton) on Feb 20, 2013 at 19:49 UTC |