I would actually suggest forgoing the loop altogether and using grep
Nothing wrong with using grep to fill the @FILES array, although I might do grep { -f and not -l } depending on how symlinks should be treated. However, unless my eyes are failing me, you still have the loop in your code.
And do you really want to use "die" in a loop?
The OP seems to and, since I don't know what the requirements are, I followed his/her lead.
Cheers,
JohnGG
In reply to Re^3: Problem with regex
by johngg
in thread Problem with regex
by nave448
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |