8.49. Cwd
The Cwd module
provides three functions that get the pathname of the current working
directory. Using these functions instead of the
pwd command will make your code more portable,
because not all systems have pwd.
Gets the current working directory. This is the safest way to get it.
cwd
A faster way to get the directory, but somewhat more dangerous
fastcwd
because of the way it works internally.
Does the same thing as cwd by reimplementing the C
getcwd
library functions getcwd(3) or
getwd(3) in Perl.