Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

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?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (9)
As of 2015-07-06 13:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (74 votes), past polls