Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: comparing two values under 'perl -w'

by RMGir (Prior)
on Apr 02, 2002 at 15:50 UTC ( [id://156033]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub equalOrBothNull
    {
    ...
       ((defined($a) && defined($b) && $a==$b) ||
        (!defined($a) && !defined($b));
    }
    
  2. or download this
    not defined($a) && not defined($b)
    
  3. or download this
    $ perl -MO=Deparse -e'not defined($a) && not defined($b)'
    not defined $a && !defined($b);
    -e syntax OK
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (4)
As of 2024-04-24 21:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found