One thing at a time all the time!

Welcome to Rocteur
Saturday, April 20 2024 @ 09:07 AM CEST

Portable way to print working directory - pwd

system "pwd";

But that'll fail on non-unix systems, so a more portable way is:

use Cwd;
print getcwd, "\n";

--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095

FAQ Manager » Perl » Portable way to print working directory - pwd