ogxela has asked for the wisdom of the Perl Monks concerning the following question:
This gives back a "no such file or directory" error when I run it as a CGI, but when I run it from the command line, it's fine. I've checked the permissions on the directory in question -- they're fine. Does anyone know what might be happening here?$reportsDir =~ s#\s#\\\ #g; #escape whitespace in the path $reportsDir = "/storage/$reportsDir"; opendir(REPORTDIR, "$reportsDir") or &error("Couldn't open $reportsDir +: $!"); my @logFiles = grep /csv$/, readdir REPORTDIR; closedir REPORTDIR;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Problems with opendir in CGI
by Vautrin (Hermit) on Mar 29, 2004 at 23:32 UTC | |
by ogxela (Novice) on Mar 29, 2004 at 23:39 UTC | |
by tachyon (Chancellor) on Mar 29, 2004 at 23:58 UTC | |
by ogxela (Novice) on Mar 30, 2004 at 00:03 UTC | |
by Fletch (Bishop) on Mar 30, 2004 at 02:06 UTC |