Hey, AT programming I am looking for your wonderful assistance again. I am trying to write a perl script that will go to a given web page, search for a link with a given anchor text, and then return the URL of that link. Here is what I have so far,
#!/usr/bin/perl -w
use WWW::Mechanize;
my $agent = WWW::Mechanize->new();
$agent->get("http://www.google.com");
my @links = $mech->find_all_links(
tag => "a", text_regex => qr/\bStuff\b/i );
Now this doesn't even compile, and I really don't think it's even remotely close to being correct. I have no experience with perl and all the tutorials and resources I found online were less than helpful. Any links or help you could provide me would be great.
#!/usr/bin/perl -w
use WWW::Mechanize;
my $agent = WWW::Mechanize->new();
$agent->get("http://www.google.com");
my @links = $mech->find_all_links(
tag => "a", text_regex => qr/\bStuff\b/i );
Now this doesn't even compile, and I really don't think it's even remotely close to being correct. I have no experience with perl and all the tutorials and resources I found online were less than helpful. Any links or help you could provide me would be great.