if( -d $filename ) { if( $promotion_method == $METHOD_FTP ) { ------> push( @global_files, recurse_dir( $filename ) ); } elsif( $promotion_method == $METHOD_RDIST ) { $filename =~ s/\/$//; push( @global_files, $filename ); } else { logmsg( 'docopy', 2, "PANIC!!!! No valid promotion method defined!" ); exit( 1 ); } } else { push( @global_files, $filename ); } #### # 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; } #### main::go(docopy.pl:61): push( @global_files, recurse_dir( $filename ) ); DB<4> n File::Glob::csh_glob(/usr/local/lib/perl5/5.6.1/sun4-solaris/File/Glob.pm:175): 175: if (wantarray) { 99 levels deep in subroutine calls!