http://www.perlmonks.org?node_id=394121


in reply to Even and uneven numbers as RegEx

A one-line solution would be
perl -i.bak -ne 'print if $. & 1' filename
That will remove all even numbered lines in the file.
HTH

_________
broquaint