in reply to Is it possible to return two array by the same subroutine?
See. the likes of tye's References quick reference and japhy's "list" is a four letter word for more info on references and contexts.sub foo { my @x = 1 .. 5; my @y = reverse 1 .. 5; return \@x, \@y; } my($ar1, $ar2) = foo(); print "array 1 - @$ar1\n"; print "array 2 - @$ar2\n"; __output__ array 1 - 1 2 3 4 5 array 2 - 5 4 3 2 1
_________
broquaint
|
|---|