system("cd $sd") doesn't behave the way you think it does. It starts the cd command, which immediately exits again. The current directory of the parent process (your Perl script) is not changed.
To change the directory, see chdir. Also see File::Find, if you haven't already.
In reply to Re: Traversing SubDir and Execute Unix Command
by Corion
in thread Traversing SubDir and Execute Unix Command
by neversaint
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |