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
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.
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.