http://www.perlmonks.org?node_id=1007411


in reply to Re^2: Regular expression to list all files of type in folder
in thread Regular expression to list all files of type in folder

The OP said the other does match. Please, check the OP last statement.
"..The problem is I have a file named "test.jpg" and another called "testl.jpg" and the expression only picks up the first one. Other than that, it works fine..."

If you tell me, I'll forget.
If you show me, I'll remember.
if you involve me, I'll understand.
--- Author unknown to me