Little mystery here. I've been teaching myself perl, and I want to execute regular linux / unix commands i.e. cd .. , cd /etc and have been using the command(s)
execute ("cd ..");
or
system ("cd ..");
I don't get any error messages, even when I do a debug, but for some reason even this doesn't work.
exec will replace the current process with the command which you executed.And if a shell script changes the working directory,the parent shell(process) won't be affected.
Every command shown in your script can be achieved with a simple Shell script and does not need Perl. No sure what you want to achieve here. Maybe you need to sort out the "cd" commands in Shell, then call the Perl script from the Shell script?