in reply to Returning Hashes
You can always do this in the subroutine as well as returning references.
my @foo = (); my %bar = (); modify(\@foo, \%bar); print join(':', @foo),"\n"; print join(':', %bar),"\n"; sub modify { my($aref, $href) = @_; push @$aref, (1..10); @{$href}{(1..10)} = reverse (1..10); }
|
|---|