Re: File::Find problem on windows+apache+activePerl
- From: "Jürgen Exner" <jurgenex@xxxxxxxxxxx>
- Date: Tue, 28 Feb 2006 00:17:40 GMT
Koolrans wrote:
Here is how I use the function.
@src_dir = "\\\\testnetwork\\filesToBeUploaded\\linux"
print "@src_dir";
Yikes. You are suffering from leaning toothpick syndrom.
And why an array when you are assigning only one string?
And that on Linux. I don't know for sure, but his line smells fishy to me.
find(\&processFiles, "@src_dir") or die ("Can't fetch information from
the find command: $! $@\n");
This works fine from commandline and gives an error when run from
apache. The print is successful and I can see the desired value in the
browser. The following error is logged into the log.
[Mon Feb 27 13:06:02 2006] [error] [client 10.2.20.109] Can't stat
\\\\testnetwork\\filesToBeUploaded\\linux: No such file or directory,
Well, I would guess: a permission problem. Or a problem with using the wrong
path separator.
As evident, it is an escape character issue
Well, maybe or maybe not.
First of all even on Windows you happily use normal forward slashes. Then
you don't get the leaning toothpick syndrom.
Second if you do want to have backslashes and you have a literal string and
don't want it stringified then use single quotes instead of double quotes.
Then even the backslash looses its special meaning and you don't have to
escape it.
$src_dir = '//testnetwork/filesToBeUpLoaded/linux';
jue
.
- References:
- File::Find problem on windows+apache+activePerl
- From: Koolrans
- Re: File::Find problem on windows+apache+activePerl
- From: Jürgen Exner
- Re: File::Find problem on windows+apache+activePerl
- From: Koolrans
- Re: File::Find problem on windows+apache+activePerl
- From: Paul Lalli
- Re: File::Find problem on windows+apache+activePerl
- From: Koolrans
- File::Find problem on windows+apache+activePerl
- Prev by Date: Re: A Problem With GD
- Next by Date: Copy contents of reference
- Previous by thread: Re: File::Find problem on windows+apache+activePerl
- Next by thread: Re: File::Find problem on windows+apache+activePerl
- Index(es):
Relevant Pages
|
|