[Mono-list] perl script -- alternative?

Erick mono@erick.com
Thu, 18 Apr 2002 14:16:01 -0500 (CDT)


On Thu, 18 Apr 2002, Daniel Carrera wrote:



On Thu, 18 Apr 2002, Erick wrote:

> <me>
>
>   Can you capture the cd command output?  In dos/win, unlike *nix, when
> the cd command is issued with no arguments, it returns the current path.
> the same behavior as pwd in *nix.  just a thought.
>
> </me>
>

Good idea.
I just just added that.  However, I don't have a Windows machine to try it
on.

Please try it and tell me if it works.

If you get an error saying "OS not recognized...", then please run the
script 'print "$^O\n"' on your Windows box and send me the output.

Cheers,
Daniel.



ok.  I tried the following code:

#d:\perl\bin\perl.exe -w

my $path = `cd`;
print $path



And that works, so I would assume your script will work when the reviously 
mentioned error is corrected.  :-)

Erick