in reply to Returning two lists from a sub

Assuming the real goal is to have actual arrays to work with you could return the array references and then convert them into arrays (lines 4 and 5):
#!/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; }