sub dfind { my ($dref, $top) = @_; hidden( $top ) and return; if (-d $top) { for my $file (glob( "$top/*" )) { dfind( $dref, $file ); } } else { register( $dref, $top ); # add to HoA } } sub hidden { my $file = shift; my $attribs; Win32::File::GetAttributes($file, $attribs); return $attribs & HIDDEN; }