Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^2: check if 2 values are equal

by eXile (Priest)
on Feb 07, 2006 at 01:34 UTC ( #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
Node Status?
node history
Node Type: note [id://528390]
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: (7)
As of 2016-09-27 10:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Extraterrestrials haven't visited the Earth yet because:







    Results (502 votes). Check out past polls.