[Home] [Downloads] [Search] [Help/forum]

Gammon Software Solutions forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  Perlscript
. . -> [Subject]  Directory fonctions

Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

Directory fonctions

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page


Posted by Netzayanki   (2 posts)  [Biography] bio
Date Mon 04 Jul 2005 11:02 AM (UTC)  quote  ]
Message
Does anybody know how to find the current directory in Perl? 5.8.2 for Windows?

I would like to know if there is a function like "pwd" in linux...

Thank you
[Go to top] top

Posted by David Haley   USA  (3,881 posts)  [Biography] bio   Moderator
Date Reply #1 on Tue 05 Jul 2005 05:54 PM (UTC)  quote  ]
Message
You shouldn't post a message twice if you don't get a response the first time. It's possible that people simply don't know. I checked the perl docs and couldn't see anything offhand that looked like it would do it.

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
[Go to top] top

Posted by Flannel   USA  (1,230 posts)  [Biography] bio
Date Reply #2 on Tue 05 Jul 2005 06:20 PM (UTC)  quote  ]
Message
A quick google turned up this:
http://www.unix.org.ua/orelly/perl/learn32/ch12_01.htm

Basically, spawn a shell command, or use Win32::getcwd (and theres about 10 different other commands, all with their own quirks).

However, there are also things to look out with with perl and directories. If you spawn a shell command to change a directory, it probably wont change the directory of the perl program. And you have a couple of paths to begin with anyway. Just be careful working with directories.

Oh, and this forum is for perlscript in mushclient, this question should probably be in programming > general, if anywhere.

~Flannel

Messiah of Rose
Eternity's Trials.

Clones are people two.
[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


2,521 views.

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

[Home]

Written by Nick Gammon - 5K

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( http://www.gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Internet Contents Rating Association (ICRA) - 2K]    [Web site powered by FutureQuest.Net]