Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

Re: system pwd

by jkahn (Friar)
on May 22, 2003 at 00:08 UTC ( #259945=note: print w/ replies, xml ) Need Help??

in reply to system pwd

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

use Cwd; print getcwd();

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.

Comment on Re: system pwd
Select or Download Code

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://259945]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (8)
As of 2015-11-28 22:00 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (746 votes), past polls