damian has asked for the wisdom of the Perl Monks concerning the following question:
and oh btw, the &seach_tags is the subroutine that accepts input from user to search HTML files for a certain pattern. thanks in advance.sub dirwalk { local @d_info=(); local $n = ""; local $r = ""; opendir H_DIR,$_[0]; @dir_info=readdir H_DIR; closedir H_DIR; foreach $n (@d_info) { next if $n=~/^\.*$/; if (-d "$_[0]/$n"); } else { next if !($n=~/^.+\.(htm|html)$/); ($r,$line) &search_tags("$_[0]/$n"); if ($r) { push @pages, "$_[0]/$n" if $r; } } } }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Directory Walk
by merlyn (Sage) on Sep 08, 2000 at 07:06 UTC | |
Re: Directory Walk
by eak (Monk) on Sep 08, 2000 at 07:04 UTC | |
RE: Directory Walk
by OzzyOsbourne (Chaplain) on Sep 08, 2000 at 17:42 UTC | |
A reply falls below the community's threshold of quality. You may see it by logging in. |