#!/usr/bin/perl

use strict;
use CGI qw/:standard/;

my $filename = param('file');
if($filename) {
    open(F, ">/tmp/$filename")
	or die;
    for(my $i = 0; <$filename>; ++$i) {
	print F $_;
    }
}

print
    header(-type=>'text/html'),
    start_html('hello world'),
    'Hello World',
    end_html;
