File::Find
use File::Find; my @files; find( { no_chdir => 1, wanted => sub { return unless /[.]JPG$/i; return unless -s > 2000000; push @files, $_; }, }, @directories_to_search );
use File::Find; my @files; find( { no_chdir => 1, wanted => sub { return unless /[.]JPG$/i; return unless -s > 2000000; push @files, $_; }, }, @directories_to_search );