#!perl while() { if(/start/ .. (!(/start/../end/) && /end/)) { print } } __DATA__ a a a start b start c d e end f start g h i end j end k k l