I would put some print statements in there to verify that the variables contain what u think they contain. Also Data::Dump::pp is ur friend.
e.g. print "\$top: $top\n"; Another thing I noticed. Normally u want "opendir DIR, $top", not $DIR. If $DIR is undef, that code will fail. A best practice is to always have an else{} block after any if{} blocks to catch and debug errors. The same goes for unless{} blocks. Use if(not..){} so u can use the else{} to catch errors. At 02:59 PM 9/23/2008 -0400, Dennis Daupert wrote: >=========================================== >Here's the code: > >sub dir_walk { > my ($top, $filefunc, $dirfunc) = @_; > my $DIR;, > > if ( -d $top ) { # << FAILS HERE > my $file; > unless (opendir $DIR, $top) { > warn "Couldn't open directory $top: $!; skipping.\n"; > return; > } -- REMEMBER THE WORLD TRADE CENTER ---=< WTC 911 >=-- "...ne cede malis" 00000100 _______________________________________________ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs