Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

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)

Comment on Re^2: check if 2 values are equal
Download Code

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (5)
As of 2015-10-10 02:30 GMT
Find Nodes?
    Voting Booth?

    Does Humor Belong in Programming?

    Results (254 votes), past polls