Module file writing problem

W

webmaster

Hi,

I've writting a module to store the functions I use through my website.
One of the functions needs to access a text file,
cgi-bin/user/file.dat. The function only works when the script using it
is in cgi-bin/user/. At first the line looked like "open (FILE,
'file.dat');" but then I changed it to "open (FILE,
'/user/file.dat');". It still works fine when the script is in
cgi-bin/user/, but not when it's anywhere else. What am I doing wrong?
 
B

Brian McCauley

Hi,

I've writting a module to store the functions I use through my website.
One of the functions needs to access a text file,
cgi-bin/user/file.dat. The function only works when the script using it
is in cgi-bin/user/. At first the line looked like "open (FILE,
'file.dat');" but then I changed it to "open (FILE,
'/user/file.dat');". It still works fine when the script is in
cgi-bin/user/, but not when it's anywhere else. What am I doing wrong?

Not decscribing the way in which it fails. At the very least show us
the $! error.

You've given very little to go on but at a guess this is a permissions
and webserver config issue not a Perl one.

Please read the posting guidelines.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,566
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top