in reply to Re: Re: lib
in thread lib

Or even a prefined var ;-)
print $ENV{'PWD'};

"Only Bad Coders Badly Code In Perl" (OBC2IP)

Replies are listed 'Best First'.
Re: Re: Re: Re: lib
by davorg (Chancellor) on Apr 11, 2001 at 16:38 UTC

    I think that might give you problems on non-Unix platforms.

    --
    <http://www.dave.org.uk>

    "Perl makes the fun jobs fun
    and the boring jobs bearable" - me

      It can also be inaccurate on Unix platforms, because it's a function of some shells, not every shell, and certainly not updated on chdir(2).

      -- Randal L. Schwartz, Perl hacker

Re: Re: Re: Re: lib
by arhuman (Vicar) on Apr 11, 2001 at 19:40 UTC
    You are both are right, this not a portable way.

    But I DID test it on Both Linux and Windows before submiting, and it worked.
    And as at least one of the other solutions was more platform dependant (`pwd` don't work on windows),
    I've thought it could be an acceptable answer.

    I should have emphasized more about the portability issue, but I was mainly kidding davorg ;-)

    I'll try to be more accurate next time.

    "Only Bad Coders Badly Code In Perl" (OBC2IP)