Pathologically Eclectic Rubbish Lister | |
PerlMonks |
Re: system pwdby jkahn (Friar) |
on May 22, 2003 at 00:08 UTC ( [id://259945]=note: print w/replies, xml ) | Need Help?? |
The other comments (regarding the difference between system and backticks) are entirely correct.
I have a separate comment, however -- if you want to identify the current working directory, you should use Perl's core module Cwd instead of invoking system tools. (try perldoc Cwd).
The biggest advantage is that using Cwd does not have portability issues -- your tool will continue to work correctly on whatever OS you need to use Perl on. If you already know this, great. Just my $0.02 US.
In Section
Seekers of Perl Wisdom
|
|