in reply to Useless content call in void context

I don't know that this has anything to do with the error that you are getting, but ua = LWP::UserAgent->new(keep_alive=>1); looked a bit odd to me. I don't see why would need this keep_alive option with value of 1. This evidently results in invoking some experimental stuff. I personally would not invoke experimental stuff without a very clear reason for doing so. From LWP::UserAgent
If the keep_alive option is passed in, then a LWP::ConnCache is set up (see conn_cache() method below). The keep_alive value is passed on as the total_capacity for the connection cache.
From LWP::ConnCache,
This module is experimental. Details of its interface is likely to change in the future.

Replies are listed 'Best First'.
Re^2: Useless content call in void context
by Anonymous Monk on May 09, 2012 at 20:03 UTC

    I don't know ... This evidently results in invoking some experimental stuff.

    No it doesn't :) the keep_alive option is not experimental

    While LWP::ConnCache has been marked experimental since 2001, even then, all this means was  use  LWP::ConnCache; at your own risk, because LWP::UserAgent is going to mess with it any which way it needs