in reply to Handling the POSTing of a file to a CGI script

Use CGI.pm:
use CGI; my $query = new CGI; my $fh = $query->upload('uploaded_file'); open OUT, ">/home/foo/bar/baz.html" or die "Can't open: $!" while (<$fh>) { print OUT; } close OUT;