A
afrinspray
I'm working on a program that removes html formatting from an IM
conversation. Right now, I'm storing the conversation in a variable,
where each line of the conversation is broken up by line feeds (a
single \n). Then I do the following:
my $formatter = HTML::FormatText->new;
my $tree = HTML::TreeBuilder->new;
$tree->parse($body);
if ($tree) {
$body = $formatter->format($tree);
$tree->delete;
}
where $body is the entire IM conversation.
This strips the line feeds but I needs to keep those in there. Does
anyone have any other suggestions?
Thanks,
Mike
conversation. Right now, I'm storing the conversation in a variable,
where each line of the conversation is broken up by line feeds (a
single \n). Then I do the following:
my $formatter = HTML::FormatText->new;
my $tree = HTML::TreeBuilder->new;
$tree->parse($body);
if ($tree) {
$body = $formatter->format($tree);
$tree->delete;
}
where $body is the entire IM conversation.
This strips the line feeds but I needs to keep those in there. Does
anyone have any other suggestions?
Thanks,
Mike