in reply to grabbing N lines after matching one?
while(<>) { if (/first-line-pattern/ .. /last-line-pattern/) { do your stuff; } } [download]