corpx has asked for the wisdom of the Perl Monks concerning the following question:
So get get fails (400 bad request error), but the code breaks at that line. I cant get it to go to the if/then statement at all. Any ideas? I've tried exceptions to catch that, but that also fails.$link = 'http://www.gasnom.com/ip/ozark/notices/Intraday Cuts on EW & +BS 4-18-08.txt'; $agent = WWW::Mechanize->new(); $agent-> agent_alias( 'Windows IE 6' ); $agent->get($link); if ($child_agent->success()) { $body = $agent->content(); } else { $body = ''; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to deal with error on Mechanize->get
by Corion (Patriarch) on Jul 25, 2009 at 19:51 UTC | |
|
Re: How to deal with error on Mechanize->get
by duelafn (Parson) on Jul 26, 2009 at 19:16 UTC |