in reply to Returning multiple arrays
@a = a..d; @b = e..h; ($c, $d) = _ret_arr(\@a, \@b); #print "@$c \t @$d $/"; #print "@a \t @b $/"; sub _ret_arr { my $a = shift; my $b = shift; my (@tmp_a, @tmp_b) = (@$a, @$b); # by reference #map{ $_ = uc }@$a,@$b; #return $a, $b; # by values #map { $_ = uc } @tmp_a, @tmp_b; #return \@tmp_a, \@$tmp_b }
|
|---|