You need to prepend $directory when you do your filetest:
if (-d "$directory/$dir")
HTH
In reply to Re: Directory Recursion Disorder
by pzbagel
in thread Directory Recursion Disorder
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |