Old thread, yes. But you got me thinking too. In the spirit of TMTOWTDI I offer an alternative: Put the commands in one system() call, separated by semicolons. Works for me using Perl 5.18.2 in Ubuntu 14.04 with Bash as default shell. Instead of tarring files I ran "ls -ao" after changing directories, as in the example below.
system("cd ~/jobs; ls -ao; cd ..");In reply to Re^3: cd in perl not working?
by Bethany
in thread cd in perl not working?
by metal_cd
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |