I just begin to learn some Perl based web application, however, I encounter an problem, I try to write a Perl script to download a file, which need input a code before download it. as an example, please see this url: http://epaper.dfdaily.com/dfzb/page/1/2013-08/17/A01/20130817A01_pdf.pdf.
I tried to google somehow i choose to use WWW::Mechanize, as below code, but I can't get the file. Anyone can help me on this? much thanks!!
my code here: (I suppose already get the correct code and store it to $code):
my $mech = WWW::Mechanize -> new();
$mech -> get($url);
$mech -> submit_form(
form_number => 0,
fields => {checkCode => $code}
);
print $mech -> content;