my $fh = $cgi->param('file'); open FILE, ">whatever"; print FILE while (<$fh>);