Hi Ken
Thanks for your reply.
Changing the sub routine to this
sub dir_names
{
return unless -d;
return unless /[IPD]\d{8}$/;
$dirs{$File::Find::name} = 1;
++$dirs{$File::Find::name};
}
Gives me this
C:\Temp\hddzip>perl dirpathdupes.pl
C:\Temp/Alcohol/P12345678
C:\Temp/I12345678
C:\Temp/P12345678
C:\Temp/harddrives/P12345678
C:\Temp/hddzip/P12345678
Which seems fine as its showing all instances of the P00# but I only have one directory starting with I00#, so by all rights it should not display it if I'm seaching for dupes.
Adding another P00# directory P12345677 also displays, so it seems it is still just showing directories matching "return unless /
IPD\d{8}$/;"