sub all { #Unless directory skip. return unless -d; # Don't recurse past folders matching the pattern. $File::Find::prune = 1 if /[IPDLMY]\d{8}$/; #How big is it? my $fsize = (stat($_))[7]; print "$fsize\n"; push @sfiles, $fsize; #Replace / with \ (my $fn = $File::Find::name) =~ tr#/#\\#; #Replace gpfs_data with nas\rdds $fn =~ s/gpfs_data/nas\\rdds/; #Push into the @allpathlisting array any paths matching the pattern. push @allpathlisting, $fn if /[IPDLMY]\d{8}$/; #print results to the screen, comment this out in production. print "$fn\n" if /[IPDLMY]\d{8}$/;