我正在尝试在 Perl 脚本中使用cURL下载并输出到文件。
1)我必须在下面传递用户名和密码。我应该使用什么开关?
2)当我执行 Perl 脚本时,这就是我得到的:
无法在 @INC 中找到 WWW/Curl.pm(@INC 包含: f:/Perl/site/lib f:/Perl/lib 。) 在 onesec.pl 第 9 行。 BEGIN 失败——编译在 haroldonesec.pl 第 9 行中止。
use WWW::Curl;
curl http://download2.emu-lochard.com/sfo1/gru?start-time=2009-08-15+00%3A00%3A00&end-time=2009-08-15+12%3A59%3A59&time-zone=GMT&metric=laeq --data --O curllaeq.txt
3)我怎样才能使用Wget做同样的事情?
我正在使用以下但收到错误:
use LWP::Simple;
wget --user=username --password=password http://download2.emu-lochard.com/sfo1/gru?start-time=2009-08-15+00%3A00%3A00&end-time=2009-08-15+12%3A59%3A59&time-zone=GMT&metric=laeq -O laeq.txt