download with HTML::FORM login and password on page

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!


i don't understand my code is corrupted at form "value" instance??
error prompt : Can't call method "value" on an undefined value at
ligne 27 (here :     $form->find_input('txtusername')-
Quoted text here. Click to load it

any ideas, thanks

#!/usr/bin/perl -w

    use strict;
    use warnings;
    use LWP::UserAgent;
    use HTML::Form;

    my ($user,$pass ) = qw(username password);
    my $base = 'http://www.mysite/login.asp /';

    my $ua = LWP::UserAgent->new(agent => 'Microsoft Internet Explorer
6.0' );

    my $req = HTTP::Request->new( GET => "$" );

    my $res = $ua->request($req);
    die $res->status_line if not $res->is_success;

    my $form = (HTML::Form->parse($res->content, $base))[1];


    $ua->request($form->click );

Site Timeline