On Wed, Mar 13, 2013 at 12:09 PM, G M <iamnotregiste...@hotmail.com> 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. >
Hm, what code follows the "get"? Always a good idea to check for errors in case of site outage for instance. However this worked for me a few moments ago when I tried: $agent->get(...); die $agent->status unless $agent->success; "; print "content: $a->content"; -- Charles DeRykus -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/