print OUT unless (/phn_a/ .. /1ord/); #### #!/usr/bin/perl use strict; use warnings; while () { print unless (/phn/ .. /1ord/); } __DATA__ black # input phn blue red green # 1ord yellow white