in reply to CGI file uploading subroutine

If this is where you're getting into trouble,   uploadInfo(param('cover'))->{'Content-Type'} then try extracing Content-Type before you pass the result as a parameter. I do something like:
my $filename = param('filename'); my $info = uploadInfo($filename); my $type = $info->{'Content-Type'};
and have had no problems.