- or download this
# all html files in one directory
my @files = glob 'path/to/dir/*.html';
- or download this
# all html files in all (direct, slibling) subdirectoris in a director
+y
my @files = glob 'path/to/dir/*/*.html';
- or download this
use File::Spec::Functions qw(rel2abs abs2rel);
my $txt = rel2abs(abs2rel($file, $htmlroot), $txtroot); # relocate
$txt =~ s/\.html$/.txt/; # extension