try this:
next unless ($file =~ m/.+?\.jpg$/);
Please, always check the return of your open function like so:
open ... or die "can't open file: $!"; or use autodie
In reply to Re: Regular expression to list all files of type in folder
by 2teez
in thread Regular expression to list all files of type in folder
by Phinix
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |