while { if (/xyz/) { print $_; } } #### SCRIPT: #!/usr/bin/perl -w @list = qw (leroy brown); $log="/home/psmith/logfile"; open IN (<$log); while { foreach $i (@list){ if (!/$i/) { print $_; } } } OUTPUT: the quick brown fox jumped over the lazy dogs leroy black the badest man in the whole damn town live long and prosper live long and prosper