in reply to Slice of a multidimensional array
or if you'd like to simply skip that step, and go straight to iterating over them:my @arr = (['a','b','c'], ['h','i','j'], ['x','y','z']); my @first_column = map $_->[0], @arr;
hope that helps.my @arr = (['a','b','c'], ['h','i','j'], ['x','y','z']); for (map $_->[0], @arr) { # $_ now holds the current value of column 1 (index 0) }
|
|---|