in reply to Re: Even and uneven numbers as RegEx
in thread Even and uneven numbers as RegEx

Why bother with your own $i variable when Perl gives you $. for free?

perl -i -ne 'print if $. % 2' filename

(which is, of course, pretty much what broquaint had above)

--
<http://www.dave.org.uk>

"The first rule of Perl club is you do not talk about Perl club."
-- Chip Salzenberg