Here is our server setup:
at / (this isnt the webroot)
we have the folders
/cgi-bin/
/data/
/htdocs/ (this is the webroot)
I have a script in /cgi-bin/chat/big_chat.pl
That does a require of "utility2.pl" so it is in that same folder.
Now big_chat.pl also needs to edit 2 files in 2 other folders
/data/text/chat.txt
/htdocs/cowboys/chat.txt
so big_chat.pl is setup like this
#!/usr/bin/perl
require 'utility2.pl';
&form_handler;
$textdir = "../../data/text";
$docfile = "../../htdocs/cowboys/$FORM{'3'}";
#...
Is that the correct way to do relative paths if you are working with a cgi-bin above the webroot?