my $cgi = new CGI; my $file = $cgi->param('myfile'); my $fh = $cgi->upload('myfile'); #my $type = $cgi->uploadInfo($file)->{'Content-Type'}; print "

$file"; print $_ while (<$fh>);