for $i (0..$#{$ref}) { print $ref->[$i]->[0]; }
That prints the first element of each array in the arrayref.
There are several ways to go about putting the elements into a new array. Here's what I'd do:
my @newarray = map { $_->[0] } @$ref;
-Matt
In reply to Re: array references
by DrManhattan
in thread array references
by vivapl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |