|
|
| Perl Monk, Perl Meditation | |
| PerlMonks |
Re: Re: a word of warning about /$pattern/by dada (Chaplain) |
| on Dec 02, 2003 at 11:05 UTC ( [id://311664]=note: print w/replies, xml ) | Need Help?? |
This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.
To my limited understanding, it seems like an empty pattern will return true. that's not true (or not accurate, at least). read carefully the italic lines in my previous message, in particular: if no match has previously succeded, this will (silently) act instead as a genuine empty pattern (which will always match).
If all patterns are empty, is the whole expression true? Did you test with all of the patterns being empty? yes, and yes. and that was even worse, because it helped to hide the bug from my eyes. when all the patterns were empty, all the records did match. but this happened only because no match has previously succeded, so this is something subject to an action-at-a-distance (eg. a succesful pattern match 1000 lines before may very well alter the behaviour of the search).
cheers, Aldo King of Laziness, Wizard of Impatience, Lord of Hubris
In Section
Meditations
|
|
||||||||||||||||||||||||||||