On Mar 13, 2013, at 12:09 PM, G M wrote: > > Hi all, > > I'm making an attempt at my first screen scraping script. > > For some reason the script doesn't continue after the invocation of the get > method on the last line: > > use strict; > use WWW::Mechanize; > use HTML::TokeParser; > use Data::Dumper; > print "Content-type: text/html\n\n"; > print "setting up mech<br />"; > my $agent = WWW::Mechanize->new(); > $agent->agent_alias('Windows Mozilla'); > print "mech setup"; > $agent->get('http://www.easyjet.com/en/'); > > > Can anyone see anything wrong with this? I've tried double quotes and > different urls but it doesn't attempt to "get" the page.
I can see that you are not saving the return result from $agent->get(). What do you mean by "the script doesn't continue"? Does the script hang or does it terminate? Is there any error message? Is there more to the script than you are showing? How do you know that it "doesn't attempt to 'get' the page"? Maybe it attempts to get the page and fails. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/