SOを検索しようとしましたが、近い答えが見つかりませんでした。
私が持っているのはこれです(リンクとURLは変更されますが、概念はまったく同じです)
#!/usr/bin/perl
#Some of the modules are going to be unused for now
use Win32::OLE;
use Win32::Ole::Variant;
use LWP::Simple;
use DBI;
use DBD::mysql;
use WWW::Mechanize qw();
$url = 'http://example.com';
$mechanize = WWW::Mechanize->new(autocheck => 1); #BTW what's autocheck=>1 for?
$mechanize->get($url);
$content = $mechanize->content();
print $content; #Shows the HTML (OK)
$mechanize->form_name('search');
$mechanize->field('level', '100');
$response = $mechanize->submit();
print $response->content(); #Shows the html of the submitted page (OK);
現在、この新しいフォームには、.jpg やその他の画像形式ではないランダムな画像が生成されています。やりたいことは、その画像 (名前はわかっています) を自分のフォルダーに保存することだけです。画像タグは<img src="someImage.php"> and I would like to save it as
フォルダー内の someImage.jpg` です。