#!/usr/bin/perl -wT use strict; use CGI qw (:standard); use CGI::Carp qw( fatalsToBrowser ); my $filename; if (defined($filename = param('filename'))) { my $upload = upload('file'); print header(-type=>uploadInfo($upload)->{'Content-Type'}); print while <$upload>; } else { print header(); print <
HTML }