my $file = $cgi->param('datei'); my $fh = $cgi->upload('datei'); # and then I just do: local $/; $text = <$fh>;