my %pi; @%pi{qw(status content type base length)) = get_page($site); print $length, " bytes\n"; #################################################### sub get_page { my ($site) = @_; $browser = LWP::UserAgent->new() unless $browser; my $response = $browser->get($site); if (!$response->is_success) { die "\nError: $status ($site)\n"; } return $response->status_line, $response->content, $response->content_type, $response->base, commify(length($content)); }