Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: What is the best way to compare variables so that different types are non-equal?

by moritz (Cardinal)
on Jul 20, 2009 at 08:38 UTC ( #781567=note: print w/ replies, xml ) Need Help??


in reply to What is the best way to compare variables so that different types are non-equal?

To digress a bit into Perl 6-direction: That's exactly the reason why Perl 6 has many more equality testing operators.

In this case either eqv (which does the same as Test::More::is_deeply does) or === (which compares if two variables hold the same object) would be appropriate.


Comment on Re: What is the best way to compare variables so that different types are non-equal?
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (5)
As of 2015-08-01 03:18 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 (285 votes), past polls