in reply to Regex for zip files.

I'm confused. Cutting and pasting your code and using a zip and a zip.meta file, neither file matches both regexes:
my @uploads = qw(foo.zip bar.zip.meta); foreach my $count (0, 1) { if($uploads[$count] =~ m/zip$/i) #/.*(zip)/ { print "I GOT A ZIP\n"; }else{ print "I got NADA\n" } if($uploads[$count] =~ /.*(meta)/){ print "I GOT A META\n" }else{ print "I got NADA\n" } } __END__ I GOT A ZIP I got NADA I got NADA I GOT A META
So, what's your real problem?