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:
(changed the != into a == in the first line in the function)sub isequal { return 0 if ( grep { ! defined( $_ ) } @_ ) == scalar @_; no warnings qw/uninitialized/; my %gadget; @gadget{ @_ } = (); return scalar keys %gadget == 1 ? 1 : 0; }
In Section
Seekers of Perl Wisdom