#!/usr/bin/perl -w use strict; use CGI; my $q = CGI->new; my $method = $q->request_method; my $r = rand(1000000); my $fh = $q->upload("file"); warn "fh is ",($fh ? "" : "not "),"defined"; if ($fh) { #print "Content-Disposition: attachment; filename=output.txt\n"; print "Content-type: text/plain\n"; print "\n"; print "METHOD=$method\n"; my @data =<$fh>; warn "data = '",@data,"'"; print @data; exit; } print < METHOD=$method
ENDHTML