in reply to How to zip and unzip a page in a subroutine ??

Your variable $ua is empty, this needs to contain an LWP::UserAgent object.

my $ua = LWP::UserAgent->new; my $response = $ua->get($regd_web_url, %headers);

Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it. -- Brian W. Kernighan