in reply to Getting contents of URL

Hello

I think you are mising new() in your code

my $ua=LWP::UserAgent->new;