in reply to Perl List files in directory
I managed to get it working with open dir, i placed the files under a new directory.
the problem is that now I'm getting everything, even sub-directories and i only want the xml files
opendir(dir, new_dir) or die "Cannot open dir : $!"; @files = grep {"*.xml"} readdir DIR;
can someone tell me what i'm missing?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Perl List files in directory
by Anonymous Monk on Apr 22, 2014 at 14:55 UTC | |
by Anonymous Monk on Apr 22, 2014 at 15:36 UTC | |
by Anonymous Monk on Apr 24, 2014 at 14:22 UTC | |
by Corion (Patriarch) on Apr 24, 2014 at 14:31 UTC | |
by Anonymous Monk on Apr 24, 2014 at 14:33 UTC |