in reply to Re^3: filtering an array
in thread filtering an array
i see. so if my array @positions is already defined and created, do i need to loop over all the values in @positions and then execute the code you posted?
something like:
for (@positions) {@positions = grep $_->[1] =~ /ac/i, @positions;}and then:
for (@positions) {@positions = map $_->[0], @positions;}
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^5: filtering an array
by philiprbrenan (Monk) on Sep 01, 2012 at 23:03 UTC | |
by prbndr (Acolyte) on Sep 01, 2012 at 23:15 UTC | |
by philiprbrenan (Monk) on Sep 01, 2012 at 23:19 UTC | |
by prbndr (Acolyte) on Sep 01, 2012 at 23:39 UTC | |
Re^5: filtering an array
by philiprbrenan (Monk) on Sep 01, 2012 at 22:59 UTC | |
by prbndr (Acolyte) on Sep 01, 2012 at 23:03 UTC |
In Section
Seekers of Perl Wisdom