my $file = $cgi->param('datei'); my $fh = $cgi->upload('datei'); while (my $text = <$fh>) { # Do something... like this maybe: print $out_file $text; }