in reply to removing rows from an array
First of all, can you please properly format your message?
i have a 2D array (initialized with push @positions, $read->start - 1, $base;).Actually, you have only 1D array. Read perlreftut to know how to make "2D-arrays" (they are called arrays of arrays there) properly.
Apart from grep (described above) you can use map to go through your array and remove unnecessary elements. For example, map { $_->[1] eq 'G' && () } @array
|
|---|