sub main{ my @arr0 = qw(1 2 3 4 5); my @arr1 = qw(6 7 8 9 10); return \@arr0, \@arr1; } my ($aref1, $aref2) = &main(); print $aref1->[4], "\n"; print $aref2->[4];