in reply to ActivePERL is the devil?

system('cd ...') only changes directories within the command shell you've spawned, and when the shell is done and the program continues, you're still in the same directory you started in. As mentioned already, chdir is the function to use.