in reply to WWW::Mechanize get doesn't work

The code change won't make any difference to a "hang", but will hide errors that are reported by the calling code dieing. Generally hiding such errors is a bad thing so I wouldn't do that. The following trivial code works fine fetching your problematic page:

use strict; use warnings; use LWP::Simple; my $page = get('http://www.aaaedm.com/contact.htm'); print $page;

Maybe there are warnings or errors earlier in your code execution that are causing the problem you see at the point in the code you describe. Can you whittle your current script down to a half dozen or so lines that shows the issue for the URL you give?

True laziness is hard work

Replies are listed 'Best First'.
Re^2: WWW::Mechanize get doesn't work
by Anonymous Monk on Mar 22, 2012 at 03:16 UTC

    but will hide errors that are reported by the calling code dieing.

    No, it won't hide the errors, which are available in perlvar#$@ if you look.

      Or in this case, if you know to look. The OP's comments smack somewhat of cargo culting so suggesting that the code he adopted is potentially "hiding" errors is pertinent.

      True laziness is hard work

        errors is pertinent

        and a complete tease