in reply to Is there a better way.
orchdir(Directory) or die "Directory: $!"; @uploads = glob("*$caseNumber*");
If your directory or $caseNumber have spaces in them then you will want bsd_glob, which you can get by:my @uploads = map { $_ =~ m!.*/(.*)! } glob("Directory/*$caseNumber*") +;
use File::Glob qw(:glob);
|
|---|