Jan 20, 2000, 7:23 PM
Post #2 of 5
In order for a Perl program to open a file, it needs to be given the server path, not the http path to the file.
For example, your Perl program is in your cgi-bin, and the file you want to open is in a subdirectory outside of your cgi-bin (such as http://yourdomain.com/somewhere/file.dat), you'll need to use something similar to:
<BLOCKQUOTE><font size="1" face="Arial,Helvetica,sans serif">code:</font><HR>
$filetoopen = "/home/yourdomain/www/somewhere/file.dat";
What permission settings do you have on newfilename.dat? Some servers require file permission settings as high as 777 to be able to write to a file. If in doubt, ask your server administrator.