Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

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

by psini (Deacon)
on Jul 19, 2009 at 15:33 UTC ( #781449=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 answer to points 1 and 4, AFAIK the operator 'eq' stringify both operands before comparing them. So 'X' eq 'Y' if and only if 'print X' and 'print Y' give the same string in output.

Rule One: "Do not act incautiously when confronting a little bald wrinkly smiling man."


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

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (13)
As of 2015-07-03 16:15 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 (54 votes), past polls