in reply to Iterate Recursively Through Directories
FWIW if the directory structure is always DIR$N/001.$EXT, it has a fixed depth and you don't even need File::Find(::Rule), a simple glob is enough:
use strict; use warnings; my %seen; while (my $file = glob 'Dir*/*') { (my $base = $file) =~ s/\.\w+$//; next if $seen{$base}; # work with $file here }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Iterate Recursively Through Directories
by tbone654 (Beadle) on Feb 11, 2014 at 20:18 UTC |
In Section
Seekers of Perl Wisdom