Hi, Yeah I tried putting a die line in after doing a bit of googling, I've got a print "mech ran" line where you've got "die", doesn't print anything out though :(
Cheers, G > Date: Wed, 13 Mar 2013 13:04:39 -0700 > Subject: Re: Mechanize: first attempt at scraping (should be something > trivial) > From: dery...@gmail.com > To: iamnotregiste...@hotmail.com > CC: beginners@perl.org > > 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