File::Find is good for this sort of thing,
That searches everything under the current directory for duplicate directory names. The search is breadth first. Caution, untested.use File::Find; my @dupes; { my %dirnames; sub dupe_dir { -d or return; if (exists $dirnames{$_}) { push @dupes, $File::Find::name; } else { ++$dirnames{$_} } 1; } } find(\&dupe_dir) print $_, $/ for @dupes;
After Compline,
Zaxo
In reply to Re: Duplicate Directory Names
by Zaxo
in thread Duplicate Directory Names
by tperdue
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |