我在 Windows 7 Pro 上使用 Padre 作为我的 IDE 和 Strawberry Perl。
我正在尝试创建一个 perl 脚本,该脚本可以转到网站上的文本文件,然后读取/复制文本文件。
但即使是最简单的 LWP 命令,我也无法让 LWP 工作。
#!/usr/bin/perl
use strict;
use warnings;
use LWP::Simple;
getprint('http://www.perlmeme.org') or die 'Unable to get page';
exit 0;
我不断收到此错误消息: 500 can't connect to proxy.sn.no:8001 (Bad hostname) eg 500 can't connect to (Bad hostname) http://www.perlmeme.org
我一直在谷歌搜索,使用 Microsoft Fixit 重置端口等,但我仍然无法使其工作。http//www.justskins.com/forums/lwp-connect-failing-bad-119421.html
有谁可以帮我离开这里吗?被困了好几个小时:(
编辑:
--1 foreach my $key (keys %ENV) { print "$key: $ENV{$key}\n" if $key =~ m/proxy/i; }
是的,它会打印出 FTP_PROXY 和 HTTP_PROXY,然后是:http ://proxy.sn.no:8001/
那是我从这个帮助线程获得的代理我如何安装模块?草莓 Perl 问题
我遇到了代理问题,然后我尝试了该线程的配置,然后代理问题仍然存在。
--2 我不希望在我的终端或任何东西上使用任何代理。只想将 perl 脚本连接到网站以检索文本文档。
--3 ping 损失 0%。(我只能在这篇文章中发布两个超链接)
--4 我正在使用 Windows。