echo -e "abc\ndef\nghi\n" | perl -wlne '! /def/ and print "$_";'