use warnings; use strict; while () { chomp; if (/[^aeiou][aeiou]p$/i) { print "$_ match\n"; } else { print "$_ no match\n"; } } __DATA__ carp step tip stoop steep asp food mop up