You could, but that would be missing the point, and it appears that you're still confusing arrays and scalars. @A is not a scalar string; it is an array. Its first element, $A[0] is a string, which you created by assigning a string (the result of join) to it.
I don't know exactly what combine() does here, but it appears to be returning an array of references to arrays. If you just want the values from the first sub-array, there's no need to join them into a string and then split them out again. Just deference the array:
my @c = combine(5,@n); # get array of arrays my @A = @{$c[0]}; # get first sub-array
UPDATE: Thanks to Anonymous for the precedence correction.
Aaron B.
Available for small or large Perl jobs; see my home node.
In reply to Re^6: Perl list items
by aaron_baugher
in thread Perl list items
by robertw
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |