Thanks

On 5/31/07, Kenneth Ölwing <[EMAIL PROTECTED]> wrote:


> why its showing "c:/inetpub/wwwroot" instead of
> "c:/inetpub/wwwroot/mytestscripts/perl"
>
> is anything wrong ?
>
> Please suggest me asap..
There is nothing wrong as far as I can see.

There is nothing that says that your web server has to change to the
directory your script is in before executing it - I'm not skilled in
doing CGI etc, but it's not unlikely that you'll find the webserver to
consistently *always* kick off scripts with the wwwroot as the cwd;
indeed, I wouldn't be surprised to find that fact documented as part of
the interface/environment a script can expect. Perhaps you wish to force
your cwd to the script dir? Then one way is to use FindBin and cd to the
script dir that it will provide for you.

As an aside I see no reason to do abs_path on the return from getcwd -
it already is in abs format. Basically you could replace a call to cwd
with a call to abs_path('.') - this would perhaps better illustrate what
abs_path does.

HTH,

ken1

_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to