http://qs321.pair.com?node_id=887191


in reply to How to get two array in subroutine

You need to use references. See example here:
(@listc, @listd) = simplesort(\@lista, \@listb); sub simplesort { my ($listaref, $listbref ) = @_; # De-reference the array list my (@lista) = @$listaref; my (@listb) = @$listbref; # Now you can play with both arrays. }
--
No matter how great and destructive your problems may seem now, remember, you've probably only seen the tip of them. [1]