in reply to How to find matching file names and build a @AOA using File::Find
Usually when I see "opendir" (as in holli's response), I think "glob". Combined with a bit of map-magic, I get this:
This is based on the idea that both the Afj and Cfj files exist at the same time. You can tweak this a bit if that's not always true, but I'm guessing it is.my @AoA = map { (my $C = $_) =~ s/^Afj/Cfj/; [ $_, $C ] } glob 'Afj*';
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How to find matching file names and build and @AOA using File::Find
by holli (Abbot) on Jul 06, 2005 at 13:07 UTC |