in reply to Re^4: More efficient dereferencing of a subroutine return
in thread More efficient dereferencing of a subroutine return

This also works and is 'shorter', although I would not say more maintainable:

>perl -wMstrict -MData::Dump -le "sub fillArrays { my( $r1, $r2 ) = @_; @$r1 = qw(one two three); @$r2 = qw(four five six seven); } ;; fillArrays( \my (@arr1, @arr2) ); ;; dd \@arr1, \@arr2; " (["one", "two", "three"], ["four", "five", "six", "seven"])

Replies are listed 'Best First'.
Re^6: More efficient dereferencing of a subroutine return
by gg48gg (Sexton) on Feb 20, 2013 at 19:49 UTC
    Thanks to all of you. I am going to stick to the "keep it simple, stupid" philosophy even though it is more lines and typing. I appreciate everyones' replies.