Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Traversing SubDir and Execute Unix Command

by Corion (Pope)
on Nov 08, 2008 at 16:08 UTC ( #722413=note: print w/replies, xml ) Need Help??


in reply to Traversing SubDir and Execute Unix Command

system("cd $sd") doesn't behave the way you think it does. It starts the cd command, which immediately exits again. The current directory of the parent process (your Perl script) is not changed.

To change the directory, see chdir. Also see File::Find, if you haven't already.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (6)
As of 2020-04-07 18:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The most amusing oxymoron is:
















    Results (43 votes). Check out past polls.

    Notices?