IO::Socket问题!

IO::Socket问题!

IO::Socket问题!
#!/usr/bin/perl

use IO::Socket;
$socket=IO::Socket::INET->new(
       PeerAddr=>192.168.3.131,
       PeerPort=>3000,
       Proto=>"tcp",
       Type=>SOCK_STREAM)
or die "Couldn't connect to 192.168.3.131:3000:$@\n";

# ...do something with the socket

print $socket "Why don't you call me anymore?\n";

$answer=<$socket>;

#and terminate the connection when we're done

close($socket);


这是书上讲的这部分最基本的程序,为什么我运行的时候总是输出,连接不到我的服务器和端口呢!
要连接上需要什么样的条件?
哪位帮忙解答一下我的疑惑.
哪位帮忙解答一下我的疑惑,万分感谢啊