I can't seem to get this piece of code to work. It is supposed to get a parameter (complete path and filename) from an html form, open a file at that location, print the data, and close the form.
The relevant lines of code are as follows:
my $filenew = param("comppath"
open(writenew, ">$filenew"
print writenew "@holdinfo2";
close(writenew);
It does get the path correctly because if I rem out the open, print, and close lines and tell it to print the variable $filenew it prints the complete path and filename.
If I copy that information and past it into the open(writenew, ">pastedhere" then it works correctly and does write to the directory and filename.
It does not work when passed as a variable, only when the exact same information is hand entered into the command to open the file.
I would appreciate any input.
The relevant lines of code are as follows:
my $filenew = param("comppath"
open(writenew, ">$filenew"
print writenew "@holdinfo2";
close(writenew);
It does get the path correctly because if I rem out the open, print, and close lines and tell it to print the variable $filenew it prints the complete path and filename.
If I copy that information and past it into the open(writenew, ">pastedhere" then it works correctly and does write to the directory and filename.
It does not work when passed as a variable, only when the exact same information is hand entered into the command to open the file.
I would appreciate any input.