IOW, collect all the relevant $file_name entries into an array; at that point, iterating thru the individual files requires only that you attempt to inform yourself thru study of the references above.
Update: Of course (/me says belatedly), you'll need to consider executing your script from an appropriate directory or troubling yourself to learn about perldoc -f chdir, perldoc cwd, etc.
In reply to Re^3: Open a folder
by ww
in thread Open a folder
by Dr Manhattan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |