My broken example code:
my ($r_array1, $r_array2) = foo(); print "@$r_array1\n"; print "@$r_array2\n"; sub foo { my @array1 = [1..5]; my @array2 = [6..10]; return (\@array1, \@array2); }
The above code results in a printout of the memory locations of the data and not the data itself. TIA!
$PM = "Perl Monk's";
$MCF = "Most Clueless Friar";
$nysus = $PM . $MCF;
In reply to Passing references out of subroutines by nysus
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |