http://www.perlmonks.org?node_id=1199652


in reply to Splitting a file based on matched conditions

G'day skumar_pm,

Welcome to the Monastery.

Given you weren't able to attempt any of this yourself, you should read "perlintro - Perl introduction for beginners" first.

When you've done that, which will give you a grounding in basic I/O, see "perlop: Range Operators" for the "START & END" part.

— Ken