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


in reply to Returning two lists from a sub

There is just one return list.

In the spirit of horrible solutions, you could pass the second one out-of-band. Right. But there's no sane reason to do that, is there?

So, in the spirit of insane solutions, have one more:

use strict; use warnings; sub getlists(\@\@); getlists( my @a, my @b ); print join(" ",@a),"\n",join(" ",@b); sub getlists(\@\@) { my ($foo, $bar) = @_; @$foo = (1,2,3); @$bar = (4,5,6); }

Most horrible yet? ;-)

print "Just another Perl ${\(trickster and hacker)},"
The Sidhekin proves Sidhe did it!