http://www.perlmonks.org?node_id=528390


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)