Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Comparing contents of 2 Hashes of Hashes

by MZSanford (Curate)
on Aug 16, 2001 at 15:44 UTC ( #105336=note: print w/replies, xml ) Need Help??


in reply to Comparing contents of 2 Hashes of Hashes

My first thought (untested, but should work) :
sub compare_hohs { my ($localhref,$remhref) = @_; foreach my $mach (keys %{ $localhref }) { foreach my $file (keys %{ $localhref->{$mach} }) { # have machine and file if ($localhref->{$mach}{$file} != $remhref->{$mach}{$file} +) { print "$mach:$file mismatched\n"; ## do something with mis matched ## trnasfer i presume } } } }

Thus spake the Master Programmer:
"When you have learned to snatch the error code from the trap frame, it will be time for you to leave."
-- The Tao of Programming

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (4)
As of 2023-01-27 01:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?