I have searched tutorials, etc., on the subject of using flock but it seems like nothing gives a straight answer. I have a script for a guestbook which will allow users to upload photos. Everything goes to a MySQL database with the exception of the image which will go into an html directory. This is the part for uploading the photos:
my $upload_filehandle = $query->upload("photo");
open ( UPLOADFILE, ">$upload_dir/$filename" ) or die "$!";
binmode UPLOADFILE;
while ( <$upload_filehandle> )
{
print UPLOADFILE;
}
close UPLOADFILE;
}
How do I install a lock to prevent corrupt data from more than one submission at a time?
While I'm asking question, how important is use stric
I removed it so that I could call the errors from a separate page for the purpose of translation into different languages(the guestbook is only a part of the overall script). I'm finding many things confusing using use CGI
as I was taught using the cgi-lib.pl method but have seen to many places that it is not the way to go. Also-to make the script work I had to remove the t switch for tainted input. It made the script not work at all. Am I really screwing by removing that? I've been looking for answers for about a week with one of the slowest connections in the world---any help would be appreciated. Thanx