Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
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;

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1001307]
help
Chatterbox?
Discipulus 'Thou art so fat-witted with drinking of old sack..' ++Shakespeare

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (9)
As of 2017-11-23 11:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:













    Results (334 votes). Check out past polls.

    Notices?