$_ = "Tim created the ..."; while ( /\bit (.*?)[.?!]/ig ) { print "\n$1\n"; } #### while (<>) { while ( /\bit (.*?)[.?!]/ig ) { print "\n$1\n"; } } #### perl test.pl test.txt
## while (<>) { while ( /\bit (.*?)[.?!]/ig ) { print "\n$1\n"; } } ##
## perl test.pl test.txt