foreach $host (keys %localDigest) { foreach $file (keys %{ $localDigest{$host} }) { if (exists $remoteDigest{$host}{$file}) { # replace with compare print "$localDigest{$host}{$file} = $remoteDigest{$host}{$file} +\n"; } else { print "file $host $file missing\n"; } } }
isn't it possible to compare your files,host and checksum in your original foreach loop, instead of building this complex hash structure?
MP
In reply to Re: Comparing contents of 2 Hashes of Hashes
by Monky Python
in thread Comparing contents of 2 Hashes of Hashes
by Tuna
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |