Update: Something like this might work.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" } }
In reply to Re^2: Regex for zip files.
by Marshall
in thread Regex for zip files.
by Karger78
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |