in reply to Returning two lists from a sub
#!/usr/bin/perl use strict; use warnings; my ($foo_aref,$bar_aref) = getlists(); my @a = @{ $foo_aref }; my @b = @{ $bar_aref }; print "@a @b\n"; sub getlists { my @foo = (1,2,3); my @bar = (4,5,6); return \@foo,\@bar; }
|
|---|