How does Apache invoke the script? mod_perl? CGI? FastCGI? It may simply be a setting in the configuration of one of these within Apache. If you just have a script which only prints those diagnostics and then exits, doing literally nothing else, then you can confirm that the PWD is being set outside the script itself. I would warn() instead of print() for this (so it will appear in the error log) but YMMV:
#!/usr/bin/env perl use strict; use warnings; warn "Directory is " . `pwd`; warn "Contents are \n" . `ls -al`; exit;
If that confirms it you might also want to dump %ENV to see what else might be going on.
In reply to Re: Perl - open with Apache
by hippo
in thread Perl - open with Apache
by djneely
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |