Hi,
As aukjan said, take a look at IO::Socket::INET.
A small example:
use strict; use warnings; use IO::Socket::INET; use Socket qw(:DEFAULT :crlf); $|++; my $hostname = 'localhost'; my $port = 2001; my $sock = IO::Socket::INET->new(PeerAddr => $hostname, PeerPort => $port, Proto => 'tcp') or die "Can't connect: $!"; $sock->autoflush(1); print $sock "Hello, World!$CRLF"; # Using $CRLF is more portable close $sock;
Hope it give you an idea
Regards,
:-)In reply to Re: Very basic socket question
by fmerges
in thread Very basic socket question
by blazar
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |