http://qs321.pair.com?node_id=247666


in reply to array references

I'm not sure without <code> tags, but I think what you're trying to do is this:
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