Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Smart Match is not recursive in 5.10

by mikfire (Deacon)
on Dec 24, 2007 at 14:38 UTC ( #658888=note: print w/ replies, xml ) Need Help??


in reply to Smart Match is not recursive in 5.10

When did you build? How did you generate this error? I am trying it like this:

perl -E 'say 42 ~~ [23,17,"42x",70]'
and generating no error. It actually returns true, like I would expect.


Comment on Re: Smart Match is not recursive in 5.10
Download Code
Replies are listed 'Best First'.
Re^2: Smart Match is not recursive in 5.10
by FunkyMonk (Canon) on Dec 24, 2007 at 14:47 UTC
    It's a warning, not an error. Try it with warnings enabled.

        according to this blog...
        this will be false 42 ~~ "42x" this true with a warning 42 ~~ [23, 17, "42x", 70]
        to my mind this is inconsistent and just plain wrong. edit: this is not true on my machine, apologies

        $ perl -E 'say 42 ~~ 1,2,3, "42x"' $ perl -E 'say 42 ~~ 1,2,3, "42"' 1 </code>


        This is perl, v5.10.1 (*) built for amd64-freebsd-multi

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (8)
As of 2015-07-30 17:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (273 votes), past polls