Perl equivelent of "links -dump"

G

Graham Drabble

Hi,

I currently have a script running under linux that uses

$str = `links -dump -width 72 $url`;

However I want to write this entirely in Perl so that it is easy to
port between systems, including systems that don't have links.

(For those that don't understand the call to links, it outputs a text
only representation of the HTML document formatted to keep within 72
characters.)

I've tried just reading in the raw HTML and tag stripping but that
fails because the underlying HTML may not be formatted nicely. I need
something that will properly parse the HTML to generate the text
layout.

I'm sure that this must have been done several times before but can't
find anything on CPAN. Any ideas?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,905
Latest member
Kristy_Poole

Latest Threads

Top