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


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