G. Ian Bowles wrote:
> Gentlemen/Ladies,
>
> I am very much a new person to loading PERL. I've been running scripts
> for a couple of years, and done the occasional load on a computer. This
> time, I seem to be having difficulty in interfacing the web-delivering
> program on my webserver (IIS?) with PERL.
>
> I have just upgraded the copy of ActivePERL on my server. Everything
> works fine, except one thing: when I run scripts across the web that use
> the CWD module, specifically the getcwd() function, what is returned is
> the root directory of the webserver, rather than the directory in which
> the programs are located. I have not had this problem before; I've done
> programs in PERL on a variety of servers, and they always return
> the directory in which the script resides, rather than the root web
> directory. I can make the scripts work by putting a "chdir" command, so
> that it changes the working directory to the directory in which the
> script is located, but that means they won't be portable.
>
> I guess the problem is that right now, it is always using the working
> directory at the root of the webserver. Not at the root of the drive,
> but at the root of the web directory. How can I change this?? I'm not
> sure if it's an IIS thing or a PERL thing, but it only started with
> loading the newest version of ActivePERL. I also tried to put back the
> older version, but the same thing is happening.
Switch to Apache or live with it (another M$ product that has to do
it the Redmond way).
You can use this to find your script, but probably not necessary
since you probably know where it is already and can just do a chdir.
use FindBin qw($RealScript $RealDir);
print "$::RealDir/$::RealScript\n";
--
,-/- __ _ _ $Bill Luebkert Mailto:[EMAIL PROTECTED]
(_/ / ) // // DBE Collectibles Mailto:[EMAIL PROTECTED]
/ ) /--< o // // Castle of Medieval Myth & Magic http://www.todbe.com/
-/-' /___/_<_</_</_ http://dbecoll.tripod.com/ (Free site for Perl/Lakers)
_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs