in reply to Perl Upload with JQuery
Line 20 of your Perl creates a handle for a file named "new_filetxt" -- not a handle for a file named "new_file.txt" (i.e. filename dot extension) as you apparently intended.
Inside (despite!) the double quotes, open my $NEWFILE_FH, "+>", "$web_home/tmp/$newfilename.txt" concatenates "txt" to "new_file":
perl -e "my $filename = "new_file"; my $var ="$filename.txt"; print $v +ar;" new_filetxt
And the error message in "or die "Problems creating file '$newfilename': $!"; misleadingly reports an inability to create a file of a different name, "new_file."
Update: Fixed typo in para1, s/"new_filetext"/"new_filetxt"/;
Update2: My VERY bad; tested at a w32 CLI and forgot that Mr. Gates prodigy would not correct my failure to escape the interior double quotes. Sorry for inconveniencing all those electrons... and for my error!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Perl Upload with JQuery
by Anonymous Monk on Dec 08, 2010 at 19:11 UTC |