in reply to trouble with system commands

when you run commands via the back ticks, they are system calls that will cause a child process to be created, which does change directories, but the parent does not. I am not sure what you script wants to do, but you may want to look into the opendir Perl function. -- Raymond M. A. Erdey