Hello
I think you are mising new() in your code
my $ua=LWP::UserAgent->new; [download]
In reply to Re: Getting contents of URL by tulsyan in thread Getting contents of URL by perl_devel