in reply to Comparing each line of a file to itself
use warnings; use strict; use Digest::MD5 qw(md5); my %SEEN; while (<>) { chomp; my $digest=md5($_); if ($SEEN{$digest}++) { printf STDOUT "Dup: [%s] seen %d times\n",$_,$SEEN{$digest}; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Comparing each line of a file to itself
by bliako (Abbot) on Jan 13, 2019 at 20:27 UTC | |
by kschwab (Vicar) on Jan 13, 2019 at 20:59 UTC |