use CGI; my $query = CGI->new(); my $fh = $query->upload('uploaded_file'); while (<$fh>) { print; }