in reply to How to return the two set of arrays to the main program at the same time ??
sub calculate { #do stuff return \@a, \@b; } my ($a, $b) = calculate(10,20,30); for ( @{$a} ) { print "a: $_\n"; } my @b = @{$b}; print "@b"; [download]