Hello all, <br><br>I'm trying to write a script that'll recursively print all the directories to the screen, then go inside those directories and do the same thing primarily, until it can't go any furthur. <br><br>This is what I have now, but his doesn't work at all, and as you can see it's not recursive, If I were to add another directory in at the very end where my opendir function ends, It would only print the directory but wouldn't list everything underneath it. So can someone help direct me or redirect me to in the right direction...<br><br>opendir (DIR, "$dirname"
or die "Can't open: $!\n"; <br>@alldir = sort grep(!/^\.¦\.[aA-zZ]/, readdir (DIR)); closedir(DIR); <br>foreach $dir(@alldir){ <br> print "$dir";<br> opendir(SUB, "$dir"
or die "Can't open: $!\n";<br> @subdir = sort grep(!/^\./, readdir (SUB)); <br> closedir(SUB); <br> foreach $sub(@subdir) { <br> print "$sub"; <br> }<br>}