Cron没有从perl脚本中获取ubuntu中的代理环境,但是如果运行命令行就可以了

时间:2016-06-18 14:03:59

标签: perl proxy cron

$proxy='http://url:port';      
$ua->proxy(['http', 'https', 'ftp'] => "$proxy");     
my $ip1=qx/curl -s icanhazip.com/;      
print "ip1: $ip1\n";

最后我在一个文件中打印IP ...

问题是什么?我可以使用sh脚本,还是应该用perl编写代理? (在ubuntu中使用了export_proxy&在.bashrc文件中提供代理)

0 个答案:

没有答案