Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I can't seem to get the contentss of the file i am uploading ,is there a way i can check where i am uploading the file and the contents of it.#!/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); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: error uploading a file
by damian1301 (Curate) on Jan 04, 2001 at 03:57 UTC | |
|
Answer: error uploading a file
by coreolyn (Parson) on Jan 04, 2001 at 04:09 UTC |