Apache sets the the current directory to "/", so even though you say your snippet isn't working, it is.
Maybe you want the directory in which the script resides (which is unrelated to the current directory.) If so,FindBin should be of use.
In reply to Re: Getting CWD from within a CGI program
by ikegami
in thread Using FindBin or CWD from within a CGI program
by smack
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |