Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Need a test for deep equality

by ides (Deacon)
on Apr 21, 2002 at 22:26 UTC ( [id://160944]=note: print w/replies, xml ) Need Help??


in reply to Need a test for deep equality

Maybe I am missing something here but is there a reason you just don't compare the hashes by hand? Using recursion if they are hashes of hashes,etc? Something along these lines?
my %hash1 = { 'foo' => 1, 'bar' => 1 }; my %hash2 = { 'foo' => 1, 'bar' => 1 }; foreach my $key ( keys(%hash1) ) { die "Not equal" if $hash1{$key} != $hash2{$key}; }
I think you may be making this harder than it needs to be, either that or I'm not understanding your problem fully.

-----------------------------------
Frank Wiles <frank@wiles.org>
http://frank.wiles.org

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (2)
As of 2024-04-25 06:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found