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

darklord_999 has asked for the wisdom of the Perl Monks concerning the following question:

I have a file named input.txt which contains the following data

XXXX

YYYY

START

These are the first

set of lines

which are to be extracted

END

XXX

ZZZ

YYY

START

These are the second

set of lines

which are to be extracted

END

aasds

tteret

tertetr

......

.....

---------------

I want to extract only the data which is present in between the START and END tags while reading the file using a file handle.How to do this ?