in reply to Even and uneven numbers as RegEx
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Even and uneven numbers as RegEx
by davorg (Chancellor) on Sep 27, 2004 at 11:43 UTC |