The stupid question is the question not asked | |
PerlMonks |
Re: Regular expressions across multiple linesby Discipulus (Canon) |
on Apr 24, 2016 at 17:32 UTC ( [id://1161372]=note: print w/replies, xml ) | Need Help?? |
Welcome to the Monastery abcd The first assignement seems easy; why check for every char with the dot and not just newline ? By other hand the description you gave of your code, does not make so much sense to me (and you probably missing use strict; and use warnings; ).
Infact what i understand is that you are accomulating every new line into $string and attempting the match for every generated string: so for a 100 lines file you are actually examining 5050 lines. this can be a problem. L*
There are no rules, there are no thumbs.. Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.
In Section
Seekers of Perl Wisdom
|
|