Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^2: regex in list context

by kyle (Abbot)
on Oct 28, 2009 at 14:55 UTC ( #803695=note: print w/ replies, xml ) Need Help??


in reply to Re: regex in list context
in thread regex in list context

I think this explains why I don't like using !~. Ages ago, it "didn't do what I expected" and I learned from this only "don't use !~". Time passed, and I forgot what I was trying to do that didn't work, but I was still avoiding !~ in places it might have worked. I think this just might explain where my superstition came from.

Thank you!


Comment on Re^2: regex in list context
Select or Download Code
Re^3: regex in list context
by LanX (Canon) on Oct 29, 2009 at 00:17 UTC
    Now that I see the answer I remember discussing this issue and IMHO it makes some sense.

    What kind of list should be the logical result of a doesn't-match operator?

    Anyway it breaks the believe in orthogonality and that doubling negations leads to the same results...

    ... which is indeed not exceptional in perl's "DWIM universe".

    So the OP should better use unless and =~.

    Cheers Rolf

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://803695]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (6)
As of 2014-07-31 05:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (245 votes), past polls