in reply to Re: How to create the varibles with the file names
in thread How to create the varibles with the file names
I always find it strange that people loop and push when often it's map or grep that's needed.
opendir(MYDIR,"dir") or die "$!\n"; @txtfiles = grep { /\.txt$/ } readdir MYDIR; closedir MYDIR;
Granted, your exposition was annotated for learning purposes.
|
|---|