sub sub1() { require LWP::UserAgent; my $ua = LWP::UserAgent->new; $ua->timeout(2); ...