hi again The problem was solved: one of the hidden parameters was not defined. I fixed the code as Shlomi suggested, and tried to run it and magically it worked :-) but I have some quetions
On יום שלישי 24/7/2007, you wrote: > Hi Sagiv! > > First of all, let me note that I found it difficult to understand your > message, due to many formatting problems. Secondly, it would be useful if > you could provide a complete example that fully reproduces the problem, > rather than an incomplete snippet. Sorry > > > ||$logger->warn(__LINE__,"could not create file handle of '$k': $! - > > || ". > > > > $q->cgi_error); > > $logger->debug(__LINE__, "upload_files: upload info:".Dumper > > $q->uploadInfo($upload_filehandle)); > > > > open UPLOADFILE, ">$UPLOAD_DIR/$filename_to_write" or > > I see several problems here: > > 1. You used a glob instead of a lexical filehandle. > > 2. Due to #1 you didn't perldoc -f local the glob, which may also cause > problems. thanks and thanks > > 3. $UPLOAD_DIR starts with a capital letter. > what is wrong with that? I write configuration variables in capital letters. > 4. You used open $fh, ">$path" instead of the safer open $fh, ">", $path. > thanks - could you please explain why it is it safer ? > 5. Does $filename_to_write assure that there are no collisions? Yes, it is a unique. Regards Sagiv _______________________________________________ Perl mailing list [email protected] http://perl.org.il/mailman/listinfo/perl
