#!/usr/bin/perl -w use strict; use HTML::TokeParser; use LWP::Simple; my $page=get ('http:web.site.here/file.html'); unless (defined ($page)) {die "Unable to retrive page:$!\n";} my @links; #multi demantional array to hold links my $cnt = 0; my $p = HTML::TokeParser->new(\$page); while (my $token = $p->get_tag("a")) { my $url = $token->[1]{href} || "-"; my $text = $p->get_trimmed_text("/a"); $links[$cnt][0] = $text; $links[$cnt][1] = $url; $cnt++; } #sample of accessing links array $cnt =0; my $size = @links; while ($cnt < $size) { print "Text:$links[$cnt][0]\tURL:$links[$cnt][1]\n"; $cnt++; } exit();