foreach $clusterhost(@hosts) { foreach $file(@files) { if ($localdigest{$clusterhost}{$file} ne $remotedigest{$clusterhost}{$file}) { $error=1; print "The local $file on $clusterhost does not equal the remote $file.\n"; } } } if (!$error) { print "All files matched on all hosts.\n"; }