Beefy Boxes and Bandwidth Generously Provided by pair Networks Ovid
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.


in reply to Re: a word of warning about /$pattern/
in thread a word of warning about /$pattern/

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

  • Comment on Re: Re: a word of warning about /$pattern/

Replies are listed 'Best First'.
Re: Re: Re: a word of warning about /$pattern/
by Theo (Priest) on Dec 02, 2003 at 12:17 UTC
    (eg. a succesful pattern match 1000 lines before may very well alter the behaviour of the search)

    That's horrible! I'm sure I'll be hit with that one sooner or later. (Hope I remember this fact at that time).

    -theo-
    (so many nodes and so little time ... )

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://311664]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.