Perl equivelent of "links -dump"

Discussion in 'Perl Misc' started by Graham Drabble, Oct 18, 2009.

  1. 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?

    --
    Graham Drabble
    http://www.drabble.me.uk/
     
    Graham Drabble, Oct 18, 2009
    #1
    1. Advertising

  2. Graham Drabble

    Frank Seitz Guest

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


    HTML::Formatter?

    Frank
    --
    Dipl.-Inform. Frank Seitz
    Anwendungen für Ihr Internet und Intranet
    Tel: 04103/180301; Fax: -02; Industriestr. 31, 22880 Wedel

    Homepage: http://www.fseitz.de/
    XING-Profil: http://www.xing.com/profile/Frank_Seitz2
     
    Frank Seitz, Oct 18, 2009
    #2
    1. Advertising

  3. On 18 Oct 2009 Frank Seitz <> wrote in
    news::

    > HTML::Formatter


    That's the one. Many thanks.

    --
    Graham Drabble
    http://www.drabble.me.uk/
     
    Graham Drabble, Oct 18, 2009
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. dpackwood
    Replies:
    3
    Views:
    1,841
  2. Replies:
    8
    Views:
    4,746
    Steven Cheng[MSFT]
    Oct 20, 2005
  3. Leo Jay
    Replies:
    16
    Views:
    499
    Derek Martin
    Jun 19, 2008
  4. Jules
    Replies:
    40
    Views:
    416
    Jules
    Dec 28, 2005
  5. John Wilkinson

    Perl Equivelent of C++ program

    John Wilkinson, Mar 22, 2007, in forum: Perl Misc
    Replies:
    6
    Views:
    123
    -berlin.de
    Mar 23, 2007
Loading...

Share This Page