my $zipCheck; for (@uploads) { if (/\.zip\z/) { ++$zipCheck; last; } } die "There were no zip files\n" if !$zipCheck;