1 | Your Perl script is run with the current directory as the cgi-bin directory in which it resides, so in any file systems accessess that you program in Perl, the path names are evaluated accordingly. Suppose that you have the file system structure in the example below, then to open file1.txt or file2.txt from prog.pl, use: |
2 | open (FILE1, "file1.txt"); and open (FILE2, "../../htdoc/njm/file2.txt"); |