我正在尝试在单独的页面上填写表格并返回数据,但我的主机不支持 www::mechanize 模块。我看到 HTML::FORM 会完成同样的事情,但我得到了错误
Can't call method "value" on an undefined value at G:\Programming\test.pl line 12.
这是我一直在测试的代码
use strict;
use LWP::Simple;
use LWP::UserAgent;
use HTML::Form;
use HTML::Strip;
my $base_uri = "UTF-8";
my $url = 'xxxxxxx';
my $form = HTML::Form->parse($url, $base_uri);
$form->value(Zip => '74014');
my $ua = LWP::UserAgent->new;
my $response = $ua->request($form->click);