http://qs321.pair.com?node_id=832382


in reply to Comparing two hashes

Something like...

1. Create an outer for loop on 1st hash.
2. Create an inner for loop on the 2nd hash.
3. If keys and values of 2nd hash element is equal to the 1st hash element, then they are the same.

Replies are listed 'Best First'.
Re^2: Comparing two hashes
by moritz (Cardinal) on Apr 01, 2010 at 21:31 UTC
    Doing a linear scan over an associative array is like trying to club someone to death with a loaded Uzi -- TimToady

    Sounds like you don't need step 2. at all, since you can simply access the hash item by key.

    Perl 6 - links to (nearly) everything that is Perl 6.