in reply to Re: How do I access only certain elements of a multidimensional array?
in thread How do I access only certain elements of a multidimensional array?
Hi igoryonya,
map { push(@new_shapes, [@$_[2..$#$_]]) } @shapes;
I probably not use map like you are using.
Maybe something like so:
Output:my @new_shapes = map { [ @{$_}[ 2 .. $#$_ ] ] } @shapes; print join( " " => @{$_} ), $/ for @new_shapes;
triangle polygon blue yellow fuschia c d e f g h i j k Radio
If you tell me, I'll forget.
If you show me, I'll remember.
if you involve me, I'll understand.
--- Author unknown to me
If you show me, I'll remember.
if you involve me, I'll understand.
--- Author unknown to me
In Section
Seekers of Perl Wisdom