Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

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

by ELISHEVA (Prior)
on Jul 19, 2009 at 23:59 UTC ( #781494=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub my_eq {
      # make sure we are comparing like to like
    ...
                == Scalar::Util::refaddr($_[1]))
             : ($_[0] eq $_[1]);
    }
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2015-09-04 04:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred temperature scale is:










    Results (130 votes), past polls