• Some users have recently had their accounts hijacked. It seems that the now defunct EVGA forums might have compromised your password there and seems many are using the same PW here. We would suggest you UPDATE YOUR PASSWORD and TURN ON 2FA for your account here to further secure it. None of the compromised accounts had 2FA turned on.
    Once you have enabled 2FA, your account will be updated soon to show a badge, letting other members know that you use 2FA to protect your account. This should be beneficial for everyone that uses FSFT.

Perl question +saving to another directory

dasoldier

Limp Gawd
Joined
Apr 29, 2005
Messages
185
I am wanting my perl script to save the results of a form to another directory (not located in the cgi-bin folder. I'd like to save the results as a .txt file or .html but anytime I try to have the script save the results in another folder it stops working. It seems like such an easy task I just can't get it to work so thought I should ask. I am wanting the results to be viewable from a web browser, nothing to fancy.

This Works (saves results to the cgi-bin folder)
#save form data to a file
open(OUTFILE, ">>", "survey.txt")
or die "Error opening survey.txt. $!, stopped";
print OUTFILE "$game, $commercial\n";
close(OUTFILE);

This does not :(
#save form data to a file
open(OUTFILE, ">>", "/public_html/survey.txt")
or die "Error opening survey.txt. $!, stopped";
print OUTFILE "$game, $commercial\n";
close(OUTFILE);
 
Are you sure there is a /public_html and not something like /~web_user/public_html? That is, are you trying to access files by their URL location and not their actual position on the filesystem?
 
Back
Top