How to extract all link from web page (loaded in variable $content) to scalar @links?

Discussion in 'Perl Misc' started by Guest, Sep 11, 2006.

  1. Guest

    Guest Guest

    How to extract all link from web page (loaded in variable $content) to
    scalar @links?
    Guest, Sep 11, 2006
    #1
    1. Advertising

  2. Re: How to extract all link from web page (loaded in variable $content)to scalar @links?

    wrote:
    > How to extract all link from web page (loaded in variable $content) to
    > scalar @links?


    Write code to do it, preferably in Perl! Then run it on your computer.

    --
    Josef Möllers (Pinguinpfleger bei FSC)
    If failure had no penalty success would not be a prize
    -- T. Pratchett
    Josef Moellers, Sep 11, 2006
    #2
    1. Advertising

  3. Re: How to extract all link from web page (loaded in variable $content)to scalar @links?

    wrote:
    > How to extract all link from web page (loaded in variable $content) to
    > scalar @links?
    >
    >


    smth. like this?

    use HTML::LinkExtor;
    my $parser = HTML::LinkExtor->new;
    $parser->parse($content);
    foreach my $link($parser->links){
    print "$link \n";
    }
    Vasiliy Litovchenko, Sep 11, 2006
    #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. Fenno
    Replies:
    0
    Views:
    501
    Fenno
    Nov 6, 2005
  2. Replies:
    1
    Views:
    5,744
    lordy
    Aug 7, 2006
  3. Clint Olsen
    Replies:
    6
    Views:
    338
    Jeff 'japhy' Pinyan
    Nov 13, 2003
  4. Mark

    Replace scalar in another scalar

    Mark, Jan 27, 2005, in forum: Perl Misc
    Replies:
    4
    Views:
    153
    Arndt Jonasson
    Jan 27, 2005
  5. Replies:
    2
    Views:
    131
Loading...

Share This Page