-#fix this
-
-#flush not working!
-$|++;
- my @dir_list = @_;
-printf "got into find dirs, args are: @dir_list\n";
- my @to_return = ();
- my $dir;
- foreach $dir (@dir_list) {
-printf "outer dir: $dir\n";
- local *DIR;
- opendir DIR, $dir or die "opendir $dir: $!";
- while ($_ = readdir DIR) {
- # skip if it's current or parent dir.
- next if /^\.{1,2}$/;
- my $path = "$dir/$_";
- # skip if this entry is not itself a directory.
- next if ! -d $path;
- # add to our list if it's a directory.
-printf "adding $path to our list.\n";
- push @to_return, $path;
-#this isn't needed, right????
- next;
- }
- closedir DIR;
- }
-
-printf "list before recursion: @to_return\n";