# Recursively process directories sub recurse_dir { my $filename = shift; my @results; # removed the "/" from the following; $filename has a trailing "/" (if it's a dir) # so this was returning "//" -- Chris 12.28.2001 #my @list = glob( "$filename/*" ); my @list = glob( "$filename*" ); foreach my $file (@list) { if ( -d $file ) { push @results, recurse_dir( $file ); } else { push @results, $file; } } return @results; }