[Mono-list] perl script -- alternative?
Daniel Carrera
dcarrera@math.toronto.edu
Thu, 18 Apr 2002 14:24:02 -0400 (EDT)
This message is in MIME format. The first part should be readable text,
while the remaining parts are likely unreadable without MIME-aware tools.
Send mail to mime@docserver.cac.washington.edu for more info.
---2140912637-964886794-1019154242=:173346
Content-Type: TEXT/PLAIN; charset=US-ASCII
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.
---2140912637-964886794-1019154242=:173346
Content-Type: APPLICATION/x-perl; name="autogen.pl"
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.A41.4.30.0204181424020.173346@coxeter.math.toronto.edu>
Content-Description: version 0.0.3
Content-Disposition: attachment; filename="autogen.pl"
IyEvdXNyL2Jpbi9wZXJsIC13CnVzZSBHZXRvcHQ6Okxvbmc7CgoKIwojIENv
bW1hbmQtbGluZSBvcHRpb25zLgojCm15ICRUT0RPICAgID0gMTsgIyBEZWZh
dWx0cyB0byAndHJ1ZScuCm15ICR2ZXJib3NlID0gMDsgIyBEZWZhdWx0cyB0
byAnZmxhc2UnLgpteSAkbmFtZXNwYWNlID0nJzsKR2V0T3B0aW9ucyAoICdU
T0RPIScgID0+IFwkVE9ETywgJ3Z8dmVyYm9zZScgPT4gXCR2ZXJib3NlLAoJ
CSdufG5hbWVzcGFjZT1zJyA9PiBcJG5hbWVzcGFjZSAgKTsKCiMKIyAgT2J0
YWluIHRoZSBhdXRob3IsIGNsYXNzIGFuZCBuYW1lc3BhY2UuCiMKbXkgKCRh
dXRob3IsJGNsYXNzKTsKd2hpbGUoIGNob21wKCRhdXRob3IgPSA8PikgKSB7
IGxhc3QgaWYgJGF1dG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