in reply to LWP::Simple and Read-only Values

I suspect that your request is timing out or failing for some other reason. Your error message is emitted when an attempt is made to modify undef, among other causes. Your code worked for me. Try testing the result of the get() call like so,

defined( my $asdf = get 'http://asdf.org') or die 'LWP::get http://asdl.org failed: ', $!;
If you need to know why a request is failing, use the full-bore LWP so you can check the response headers.

After Compline,
Zaxo