use warnings; use strict; use diagnostics; use HTML::FormatText; open INPUT, "< D:/htmladdresses.txt" or die "Problem: $!"; our @INPUT=; close INPUT; while (@INPUT) { my $input=shift(@INPUT); chomp $input; my $content=HTML::FormatText->format_file($input, leftmargin => 0, rightmargin => 50); # this is followed by some regular expression, all disabled now }