in reply to Re^3: cd in perl not working?
in thread cd in perl not working?

Put the commands in one system() call, separated by semicolons.

I see the following problems with this way:

Using perl's chdir around system or between fork and exec avoids chaining commands, and using the list form of system or exec totally avoids the extra shell with all of its problems.

Alexander

--
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)

Replies are listed 'Best First'.
Re^5: cd in perl not working?
by Bethany (Scribe) on Aug 15, 2014 at 01:32 UTC
    Good points all. Agreed then, and this will come in handy in a few days for something I'm working on. Thanks for the critique.