Home | Mirror | Search | 雜文 | ITEYE 博客 | OSChina 博客 | 51CTO 博客

6.13. WWW::Mechanize

http://search.cpan.org/~jesse/WWW-Mechanize-1.72/lib/WWW/Mechanize/Examples.pod

		
#!/usr/bin/perl

use WWW::Mechanize;
my $mech = WWW::Mechanize->new();

$url = 'http://localhost/form.php';
$mech->get( $url );

  $mech->submit_form(
        form_number => 1,
        fields      => {
            fname    => 'www',
            lname    => 'mechanize',
        }
    );

print $mech->content();		
		
		
comments powered by Disqus