I want a perl script to search a web page for a link containing certain anchor text, follow that link and then return the URL it goes to. I have looked online and really have no idea where to start. Any help you guys could give would be great.
This should get you started... #!/usr/bin/perl use LWP::Simple; my $url = "http://somewebsite.com/"; my $content = get $url or die "couldn't get content: $!\n"; print "$content\n"; Code (markup): Then read up on how to parse html in perl. This article is older, but still applicable: http://www.foo.be/docs/tpj/issues/vol5_1/tpj0501-0003.html
If you had read my post you would realize I am not looking for a perl crawler. Also plugging your own custom search in an effort to make money is extremely annoying. Thanks bille, do I really need to print the content to search it? Should I just be able to search within the page I'm on?