note
swampyankee
<p>Well, what have you tried?</p>
<p>There is, of course, more than one way to do this. One way is to use [doc://grep]:</p>
<code>
my @after;
@after = grep { !/[GT]/ } @positions;
</code>
<p>which is, in essence,<code>
my @after;
foreach @positions {
push(@after, $_) if (!/[GT]/);
}
</code>
<p>I tend to use parenthesis where perl's syntax doesn't require them, but that's just me. <em>I</em> find they frequently improve readability.</p>
<!-- Node text goes above. Div tags should contain sig only -->
<div class="pmsig"><div class="pmsig-494652">
<hr><p>
Information about American English usage [http://wsu.edu/~brians/errors/index.html|here] and [http://andromeda.rutgers.edu/~jlynch/Writing/|here]. Floating point issues? Please read [http://docs.sun.com/source/806-3568/ncg_goldberg.html| this ] before posting. — emc</p>
</div></div>
991184
991184