Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

Re: Read text from HTML file and display it

by Khen1950fx (Canon)
on Oct 29, 2012 at 02:47 UTC ( #1001307=note: print w/ replies, xml ) Need Help??

in reply to Read text from HTML file and display it

Another way to do it:

#!/usr/bin/perl BEGIN { $| = 1; $^W = 1; } use strict; use autodie; use warnings; use HTML::TreeBuilder; use HTML::FormatText; my $html = shift @ARGV; my $tree = HTML::TreeBuilder->new->parse_file($html); my $formatter = HTML::FormatText->format_file( $html, leftmargin => 0, rightmargin => 50, ); print $formatter;

Comment on Re: Read text from HTML file and display it
Download Code

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1001307]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (9)
As of 2015-11-30 14:01 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (771 votes), past polls