Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re^2: check if 2 values are equal

by eXile (Priest)
on Feb 07, 2006 at 01:34 UTC ( [id://528390]=note: print w/replies, xml ) Need Help??


in reply to Re: check if 2 values are equal
in thread check if 2 values are equal

thanks, I eventually used your solution, with a minor modification:
sub isequal { return 0 if ( grep { ! defined( $_ ) } @_ ) == scalar @_; no warnings qw/uninitialized/; my %gadget; @gadget{ @_ } = (); return scalar keys %gadget == 1 ? 1 : 0; }
(changed the != into a == in the first line in the function)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (4)
As of 2024-04-20 11:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found