in reply to YARQ:Yet another reference question
my ($arr1, $arr2) = &sub(); print join("\n",@$arr1); print join("\n",@$arr2); sub sub { my @arr1 = qw(foo bar quux); my @arr2 = (1,2,3); return(\@arr1,\@arr2); }
note: you don't have to my the arrays in your function, it's just nicer to not have globals hanging around (also, I'm not to crazy about a subroutine named "sub" - perfectly legal but a little too wacky).
-derby
|
|---|