Reply to this subject
Start a new subject
 
Refresh page
| Posted by |
Netzayanki
(2 posts) 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 | top |
|
| Posted by |
David Haley
USA (3,881 posts) 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 | top |
|
| Posted by |
Flannel
USA (1,230 posts) 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. | 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
Start a new subject
 
Refresh page
top
Comments to:
Gammon Software support
Forum RSS feed ( http://www.gammon.com.au/rss/forum.xml )