while () { if (/START/ .. /STOP/) { push @lines, $_; } }