I have the Perl & LWP book, but how do I set the user-agent string?

This is what I've got:

use LWP::UserAgent;
use LWP::Simple; # Used to download files

my $u = URI->new($url);
my $response_u = LWP::UserAgent->new->get($u);
die "Error: ", $response_u->status_line unless $response_u->is_success;

Any suggestions, if I want to use LWP::UserAgent like I do here?

Edit
Report