P is for Practical | |
PerlMonks |
Re: Regular Expression Matching Issueby olus (Curate) |
on Jan 02, 2008 at 21:38 UTC ( [id://660060]=note: print w/replies, xml ) | Need Help?? |
I didn't check the regular expression in order to see if did what you it to do, but I see that you trying to use it as if was applied to the _whole_ file, and you are using it only for a single line each time. The 's' switch isn't working because you are working on a single line. 'join' @test and work on that, or change the foreach cicle and look for lines that have the block begin, capture everything until you find another line that matches the block ending.
In Section
Seekers of Perl Wisdom
|
|