in reply to Perl Mechanize Woes

However at some point during the process, the script abruptly dies.

You could try to unset autocheck in the constructor (and then handle errors yourself, of course):

my $mech = WWW::Mechanize->new( autocheck => 0 ); ...

When enabled (which is the default in newer1 versions of WWW::Mechanize), any errors make the program die.  You seem to have a newer version...

___

1 from the Changes file:

1.49_01 Sat Sep 27 23:50:04 CDT 2008 ======================================== [THINGS THAT MAY BREAK YOUR CODE] The autocheck argument to the constructor is now ON by default, unless WWW::Mechanize is being subclassed. There are so many new programmers whose ->get() calls fail unchecked that I'm now putting on the seat belts for them.

Replies are listed 'Best First'.
Re^2: Perl Mechanize Woes
by listanand (Sexton) on Oct 15, 2009 at 18:21 UTC
    This worked very nicely. Thank you very much for your timely help.
    Andy