#!/usr/bin/perl $goprint=0; while (<>){ if ($_ =~ /^Start(.*)/){$goprint=1} if ($_ =~ /^END(.*)/){$goprint=0;next} print "$_" if $goprint == 1; }