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

Discipulus has asked for the wisdom of the Perl Monks concerning the following question:

hello monks!
I was inteded to compare two hash and I fall in this:
%aa=(uno=>1, due=>2); %bb=(due=>2, uno=>1); if (%aa eq %bb){print "equal\n"} else {print "boh?\n"} __END__ :>equal ########################### %aa=(uno=>1, due=>2); %bb=(due=>2, uno=>1111111322321111111111); if (%aa eq %bb){print "equal\n"} else {print "boh?\n"} __END__ :>equal

Why ? there is some smart way to compare two hash without foreach sort keys ??
%aa eq %bb seems to compare only the keys..

TIMT1WToLooseReputation
greetings from sunny roma
lor*

20040220 Edit by BazB: Changed title from '%a eq %b'