Just another Perl shrine | |
PerlMonks |
Re: Re: print line 5 lines previous to comaprison line!by Adam (Vicar) |
on Jun 08, 2001 at 01:47 UTC ( [id://86772]=note: print w/replies, xml ) | Need Help?? |
Nice. One suggestion:
The \Q and \E presume that $pat is just a string, not a regex. So you would want to escape any special characters (like '.' or '+' ) and the o tells Perl that $pat isn't going to change in the loop, so it won't keep recompiling the pattern.
In Section
Seekers of Perl Wisdom
|
|