my @zips = grep { /\.zip$/} @uploads; my @meta = grep {/zip\.meta$/} @uploads; # "Your Mother" pointed out that I had meta/$ instead # of the correction shown. .meta$/} Oooops. print "zips= @zips\n"; print "zipmeta= @meta\n"; #### foreach my $upload (@uploads) { if ($upload =~ m/zip$/i) { print "I GOT A ZIP\n"; } elsif ($upload =~ m/zip\.meta$/i) { print "I GOT A META\n" } else { print "I got NADA" } }