http://www.perlmonks.org?node_id=996870


in reply to Re^2: How to save first two columns of an array into another array
in thread How to save first two columns of an array into another array

In your code above, you are creating @a & @b as arrays of references to (one element) arrays. Perhaps what you intend is something like:
my @a = map { ${ $_ }[0] ] @S;
TJD
  • Comment on Re^3: How to save first two columns of an array into another array
  • Download Code