|
|
| We don't bite newbies here... much | |
| PerlMonks |
Re: Quick regex questionby atcroft (Monsignor) |
| on Mar 31, 2011 at 19:26 UTC ( #896708=note: print w/ replies, xml ) | Need Help?? |
|
Create a flag. Loop through the file. Set the flag before testing a line, bail out if the regex matches, unset it at the end of the loop. Once you exit the loop, see if the flag is set, and skip processing if it is set. An (untested) example:
Hope that helps. Update: 2011-03-31 Updated text slightly for clarity. Added comment in code.
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||