Just a qwik copy & paste .. scuse errors/ommissions the 'qif;sub handle_dir { my $d = shift; my $sd = shift || ''; my @all = (); opendir (DIR, $d) or die "Broken!"; while (defined(my $file = readdir(DIR))) { push @all, $file; } chdir ($d); foreach my $file (@all) { next if $file =~ /^\.$/; next if $file =~ /^\.\.$/; my $fp = $d . "\\" . $file; if ($file =~ /htm$/i) { &handle_html ($fp); } if (-d $file) { &handle_dir ($fp); } chdir($d); } chdir(".."); }
In reply to Re: recurse directories and sub-directories
by zuqif
in thread recurse directories and sub-directories
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |