问题描述
我在 (1) PC/Windows 10 和 perl 5.14.2 和 (2) Mac/OS X 10.11.6 和 perl 5.18.2 上尝试了 getstore() 和 get()。
getstore 产生的一些状态码如下:200 是一个好的 URL,500 是“服务器无法传递”。 有关如何解决此问题的任何想法?
use strict;
use warnings;
use LWP::Simple;
print "\nThe below is successful on both Windows 10 and OS X\n";
my $url = "http://example.com";
my $status = getstore($url,"/tmp/web.html");
print "Result of getstore for \"$url\"\n is \"$status\" . Success=" . is_success($status) . "\n";
print "\nThe below is successful on Windows 10 but not on OS X\n";
$url = "https://drive.google.com/open?id=1FqtZptibqeu4uKbv0vzinjWv5bwi8-Y2";
$status = getstore($url,"/tmp/web.html");
print "Result of getstore for \"$url\"\n is \"$status\" . Success=" . is_success($status) . "\n";
print "\nPress Enter to exit";
my $ans =<stdin>;
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)