in reply to Problem pulling directories out of an array.

The issue is that readdir() returns just the file/dir name in the target dir so you need to add the dir path to your -d test

if ( -d "$dirtoget/$f" )

You could of course just do this:

# dirs with full path print "$_<br>\n" for grep{ -d $_ } glob($dirtoget); # just the relative path print "$_<br>\n" for map{s/\Q$dirtoget\E//;$_}grep{-d $_}glob($dirtoge +t);

map grep and glob are useful perl power tools....

cheers

tachyon