in reply to error uploading a file

The problem is that CGI.pm uses param() to get parameters and not %in. It should work here...
use CGI qw/:all/; use Fcntl qw(:flock); print header; # get the file from the input stream $upload = param("UPLOAD"); # check if it's there, and write it to disk if ($upload){ open (TEXT, ">filename.txt") || die "$!"; flock (TEXT, LOCK_EX) || die "$!"; print"i had to find out if it works\n"; while (<$upload>) { print TEXT ; } close(TEXT); }