in reply to Regular expression to list all files of type in folder

In case it's a case issue, you could try:

$file =~ m/\.jpg$/i