my $type = uploadInfo($remotefile)->{'Content-Type'}; unless ( $type eq 'image/pjpeg' || $type eq 'image/gif' || $type eq 'image/bmp') { print "Wrong! This is not a supported file type."; exit; }