foreach my $file (@filelist) { push(@curr, $1) if $file =~ /^(FRAUD-REPORT\d+\.CSV)$/i; }