perl lwp

perl lwp
自己写了一个perl 程序:
#/usr/bin/perl -w
use strict;
use warnings;
use LWP;
use HTTP::Request::Common;
use HTML::Form;

use constant{
    url => "http://11.133.168.47:8001/login.jsp",
    out_url => "http://11.143.68.12:8001/logout.jsp",
};
my $agent = LWP::UserAgent->new;
sub login
{
    my $res = $agent->get(url,'User-Agent' => 'Mozilla/4.76(Windows;U;Windows NT 5.1;zh-CN)', 'Accept-charset' => 'utf-8' );
    my $form = HTML::Form->parse($res->content(),url);
    $form->value('usrname','12323');#username
    $form->value('password','password');#password
    my $response = $agent->request( $form->click );
    $response->is_success or die"url: ",$response->message,"\n";
   
    if( $response->content =~/12323/){
    print "login success \n";
    print $1,"\n";
    }
    else{
    die "login error :wrong password \n";
    }
}
login();

通过调用该程序我可以登录该界面,然后我通过正则表达式的一些操作得到该页面的一些href.
比如<a href = "logout.jsp">退出</a>以及一些链接。我想通过perl登录到该界面后去执行这些链接。
我该怎么写?谢谢了!!!