aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2017-08-21 16:29:01 +1200
committerTom Ryder <tom@sanctum.geek.nz>2017-08-21 16:29:01 +1200
commitf28bc4f5ddf154c019776527392d8e64a77cf50e (patch)
treec26c803d610f0439f80edeceb9adc3d5c4bc3cd6
parentCorrect ridiculous loop short-circuit error (diff)
downloadcheckem-f28bc4f5ddf154c019776527392d8e64a77cf50e.tar.gz
checkem-f28bc4f5ddf154c019776527392d8e64a77cf50e.zip
Use hex digest for key, duplicate into hashref
-rwxr-xr-xcheckem3
1 files changed, 2 insertions, 1 deletions
diff --git a/checkem b/checkem
index 84b356b..e05d3bb 100755
--- a/checkem
+++ b/checkem
@@ -110,7 +110,8 @@ SIZE: for my $fs ( grep { @{$_} > 1 } values %sizes ) {
if ( open my $fh, '<', $f->{name} ) {
binmode $fh;
$dig->addfile($fh);
- push @{ $sums{ $dig->digest() } }, $f;
+ $f->{hexdigest} = $dig->hexdigest();
+ push @{ $sums{ $f->{hexdigest} } }, $f;
close $fh
or carp 'Failed to close file';
}