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
In reply to Re^4: cd in perl not working?
by afoken
in thread cd in perl not working?
by metal_cd
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |