C:\test>type junk.txt 1 2 3 4 5 C:\test>perl -nle"$_ & 1 and print" junk.txt 1 3 5 C:\test>perl -ple"$_ & 1 or undef $_ and next" junk.txt 1 3 5