\s*||sg;
#
# Strip end of page after message
#
$content =~ s|\n.*$||sg;
#
# Strip the attachments block
#
$content =~ s|| Attachments | .*?\n||sg;
#
# Special header fixes
#
# Chop the last table block before the header
$content =~ s|\s*| | \s*| ||sg;
#
# So header lines don't come out double spaced
#
$content =~ s| | \s+||sg;
#
# Put line breaks in the right places in the header
#
$content =~ s/ /\n/g;
#
# Strip any remaining page tags
#
for my $tag ( qw( tr td table img b ) ) {
$content =~ s|<$tag[^>]*>||sg;
$content =~ s|$tag[^>]*>||sg;
}
#
# Remove links
#
$content =~ s/]+>//sg;
$content =~ s|||g;
#
# Reformat entities as text
#
$content =~ s/ / /g;
$content =~ s/&/\&/g;
$content =~ s/>/>/g;
$content =~ s/</ $out") || die "Can't write to '$out': $!\n";
print OUT "$content\n";
close(OUT);
$form{"doDelete"} = "1";
$form{"midlist"} = "$mid";
DEBUG && print STDERR "Deleting: $mid\n";
$mech->post( $view, \%form );
}
|
| |
|