in reply to Taking file from current working directory

Cwd should help you in a portable way.

Flavio (perl -e 'print(scalar(reverse("\nti.xittelop\@oivalf")))')

Don't fool yourself.
  • Comment on Re: Taking file from current working directory

Replies are listed 'Best First'.
Re^2: Taking file from current working directory
by mosh (Scribe) on May 23, 2005 at 13:00 UTC
    Thanks for the suggestion, but Cwd doesn't work on Win32 OS, as written in the CPAN testers:
    http://testers.cpan.org/show/PathTools.html#PathTools-3.07

    Any other ideas?

    Mosh.

      Well, if all you want is cwd, why don't you install the Cwd module? The current version seems to pass on all OS's (and I use it myself under Windows.)

        The latest version of the Cwd module comes in the PathTools distribution.
      Cwd is a core module, which means it comes with perl. You already have Cwd. cpan-testers results can't be taken at face value, especially a vague report like http://www.nntp.perl.org/group/perl.cpan.testers/204675. It looks like that reporter doesn't have a compiler, so there is no chance he could ever successfully build Cwd.
Re^2: Taking file from current working directory
by holli (Abbot) on May 23, 2005 at 12:35 UTC
    That doesn't help at all. The OP does not what the current working directory is, so he can't cwd there.

    Update: striked. Looks like I am a dumb today.



    holli, /regexed monk/
      Uh?
      This module provides functions for determining the pathname of the current working directory. It is recommended that getcwd (or another *cwd() function) be used in all code to ensure portability.
      Seems a little more portable than "./", but I might be missing something.

      Update: ah, maybe I understand now. CWD stands for "Current Working Directory", the function tho change directory in Perl is chdir. That's what maybe misguided you.

      Flavio (perl -e 'print(scalar(reverse("\nti.xittelop\@oivalf")))')

      Don't fool yourself.