in reply to Getting all the directories
sub finddir { my $root = shift; chomp ( $root ); $root = $root . '/' unless ( $root =~ m|/$| ); local *DIR; opendir ( DIR, $root ); while ( defined(my $file = readdir( DIR )) ) { next unless ( -d $root . $file ); next if ( $file eq '.' ); next if ( $file eq '..' ); print $root . $file, "\n"; finddir( $root . $file ); } }
Update Fixed two bugs.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
| A reply falls below the community's threshold of quality. You may see it by logging in. |