in reply to filtering an array
push @positions, [ $read->end + 1, $base ];
i would like to remove every line of this array that contains a G or a T as the string
@positions = grep $_->[ 1 ] =~ /ac/i, @positions;
i would like to get rid of the strings altogether, so i just have an array with one column representing the number
@positions = map $_->[ 0 ], @positions;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: filtering an array
by prbndr (Acolyte) on Sep 01, 2012 at 22:30 UTC | |
by philiprbrenan (Monk) on Sep 01, 2012 at 22:41 UTC | |
by prbndr (Acolyte) on Sep 01, 2012 at 22:48 UTC | |
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 22:59 UTC | |
by prbndr (Acolyte) on Sep 01, 2012 at 23:03 UTC |
In Section
Seekers of Perl Wisdom