use CGI; my $q=new CGI; my $file=$q->param('foo'); #foo is the name of the file field in the form print "You uploaded $file:"; #$file is the name of the file print <$file>; #and it can also be used as a file handle to get the contents of the file