in reply to Iterate trough a series of folders

readdir will return the directories without complete path. the "." and ".." are also returned just like if you did ls or dir under windows. "." is current dir, and ".." is previous directory. You need to filter those out. grep {!/^./ and -d $_}readdir; if you have "hidden directories that start with "." and you want them, then modify grep accordingly.