为什么perl Socket无法连接到互联网?

时间:2018-10-02 23:01:57

标签: perl io-socket

我正在读《用perl进行网络编程》一书。在其中一位导师中,我找不到答案!!!请有人帮我...

#!/usr/bin/perl
use v5.26;
use IO::Socket;

my $server = 'https://www.google.com';
my $sock = IO::Socket::INET->new($server);
my $line = <$sock>;
say $line;
close ($sock);

它说: “不能使用未定义的值作为符号引用...”

0 个答案:

没有答案
相关问题