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

Re: check if 2 values are equal

by davido (Cardinal)
on Jan 24, 2006 at 23:37 UTC ( #525349=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub isequal {
        return 0 if ( grep{ !defined($_) } @_ ) != scalar @_;
    ...
        @gadget{ @_ } = ();
        return scalar keys %gadget == 1 ? 1 : 0;
    }
    
  2. or download this
    use strict;
    use warnings;
    ...
        }
        print "Testing $left, $right == ", $comp ? "equal\n" : "not equal\
    +n";
    }
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (1)
As of 2021-10-23 01:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My first memorable Perl project was:







    Results (86 votes). Check out past polls.

    Notices?