while (<>) { for split { print "$_\n" if m/ing$/ } }