Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
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 all is quiet...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (4)
As of 2017-03-24 22:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (308 votes). Check out past polls.