or, for a one liner :my $i; while (<DATA) { print if ($i++ % 2); } __DATA__ 435 435 f,sdlf,dsl f,sdlf,dsl 64{# 64{# Blah Blah
perl -i -ne 'print if ($i++ % 2)' filename
In reply to Re: Even and uneven numbers as RegEx
by zejames
in thread Even and uneven numbers as RegEx
by New Novice
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |