in reply to How to find matching file names and build a @AOA using File::Find

You don't need File::Find. Since all your files are in the same directory, you can use a simple opendir.
my $dir = "c:/"; my @AoA = (); #open dir and loop over files opendir DIR, $dir or die $!; while ( my $file = readdir(DIR) ) { #skip directories next if -d "$dir/$file"; #skip files that are not interesting next unless $file =~ /^Afj(.+)/; #check for existence of corresponding file (warn "corresponding file not found: Cfj$1\n"), next unless -e "$dir/Cfj$1"; #add to array push @AoA, [$file, "Cfj$1"]; } closedir DIR;


holli, /regexed monk/
  • Comment on Re: How to find matching file names and build and @AOA using File::Find
  • Download Code