Syntactic Confectionery Delight | |
PerlMonks |
Re^3: cd in perl not working?by Bethany (Scribe) |
on Aug 13, 2014 at 03:53 UTC ( [id://1097213]=note: print w/replies, xml ) | Need Help?? |
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 Section
Seekers of Perl Wisdom
|
|