use warnings; use strict; use diagnostics; use HTML::FormatText; use HTML::TreeBuilder; use Object::Destroyer; open INPUT, "< D:/websiteadresses.txt" or die "Problem: $!"; my @INPUT=; close INPUT; while (@INPUT) { my $inputfile=shift(@INPUT); chomp $inputfile; print $inputfile; my $formatter = HTML::FormatText->new(); my $content=$formatter->format(Object::Destroyer->new(HTML::TreeBuilder->new_from_file($inputfile), 'delete')); }