Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I want to read the block which is start from "=begin" and end with "=end" in a single stroke. I can read like ,some another lines =begin some lines some lines =end some another lines...
But I need a best way to read the blocks in Perl regular expressions.. Thanks in advance....while (<file_handle>) { if(/=begin/) { read the next line. check whether the line is "=end" or not... If it "=end" stop the read operation. Otherwise contin +ue the read process. } }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Regular expression...
by jwkrahn (Abbot) on Oct 08, 2010 at 06:27 UTC | |
by walkingthecow (Friar) on Oct 08, 2010 at 19:52 UTC | |
Re: Regular expression...
by murugu (Curate) on Oct 08, 2010 at 07:05 UTC | |
Re: Regular expression...
by eyepopslikeamosquito (Archbishop) on Oct 08, 2010 at 07:33 UTC | |
Re: Regular expression...
by prasadbabu (Prior) on Oct 08, 2010 at 06:27 UTC | |
Re: Regular expression...
by johngg (Canon) on Oct 08, 2010 at 15:48 UTC | |
Re: Regular expression...
by locked_user sundialsvc4 (Abbot) on Oct 08, 2010 at 16:11 UTC | |
Re: Regular expression...
by snape (Pilgrim) on Oct 10, 2010 at 01:12 UTC |