in reply to error uploading a file
in thread Answer: error uploading a file

And the catogory is?

First your post should have been posted in 'Seekers of Perl Wisdom' or SOPW as it is often referred to here. Catagorical Answers are for specific questions.

Second you need to learn about <code> tags. Surrounding your code between <code> (code here) </code> would have your code look a little more like this:

#!/opt/ZDperl/bin/perl use CGI; use Fcntl qw(:flock); $mycgi = new CGI; print $mycgi->header; # get the file from the input stream $upload = $in{"UPLOAD"}; # check if it's there, and write it to disk if $upload) # if it's plain text { open (TEXT, ">filename.txt") || die "$!"; unless (flock (TEXT, LOCK_EX)) {die "$!";} print"i had to find out if it works\n"; while (<$upload>) { print TEXT ; } close(TEXT);

This is still a mess but you get the gist. Maybe you should repost it the way YOU want it to be read in SOPW.

coreolyn