good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re: How do I read all the file names of a directory into an array?by mrmick (Curate) |
on Dec 10, 2000 at 20:14 UTC ( [id://45948]=note: print w/replies, xml ) | Need Help?? |
You want to open the directory (handle) and read all filenames into an array using readdir. This will read all files (including . and .. into the array).
From here you can use a foreach loop to iterate throught he array and do what you want:
I hope this gets you going in the right direction... Mick
In Section
Seekers of Perl Wisdom
|
|