in reply to Re^2: File:Find pattern match question
in thread File:Find pattern match question
"We do have some duplicate directories so finding dupes is the next problem."
If you change this line in ++Athanasius' code:
$dirs{$File::Find::dir} = 1;
to
++$dirs{$File::Find::dir};
The code will run the same but now you'll have a count. You can then find duplicates like this (untested):
my @dup_dirs = grep { $dirs{$_} > 1 } keys %dirs;
-- Ken
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: File:Find pattern match question
by RockE (Novice) on Nov 01, 2013 at 01:00 UTC | |
by kcott (Archbishop) on Nov 01, 2013 at 03:31 UTC | |
by RockE (Novice) on Nov 02, 2013 at 12:36 UTC | |
by kcott (Archbishop) on Nov 03, 2013 at 05:07 UTC | |
by RockE (Novice) on Nov 03, 2013 at 11:52 UTC | |
|