将代理与 perl 脚本一起使用 [英] Use proxy with perl script

查看:50
本文介绍了将代理与 perl 脚本一起使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在这个 perl 脚本中使用代理,但我不确定如何让它使用代理.

I want to use a proxy with this perl script but I'm not sure how to make it use a proxy.

#!/usr/bin/perl
use IO::Socket;
$remote = IO::Socket::INET->new(
                        Proto    => "tcp",
                        PeerAddr => "localhost",
                        PeerPort => "8080",
                    )
                  or die "cannot connect";
print $remote "GET / HTTP/1.0\n\n";
    while ( <$remote> ) { print }

推荐答案

使用内置 代理支持.

这篇关于将代理与 perl 脚本一起使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆