require LWP::UserAgent; import LWP::UserAgent(qw(whatever)); my $ua=LWP::UserAgent::new(); #continue doing what you do with LWP...