Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister

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 having an uproarious good time at the Monastery: (8)
As of 2015-08-30 16:14 GMT
Find Nodes?
    Voting Booth?

    The oldest computer book still on my shelves (or on my digital media) is ...

    Results (350 votes), past polls