in reply to Get data from a file and put it in a Tk Entry
Making socket connections is easy with the IO::Socket::INET module:
use IO::Socket::INET; my $hostname = "localhost"; my $port = 19; $sock = IO::Socket::INET->new("$hostname:$port") or die "unable to connect: $!\n"; while (<$sock>) { ... # process line of data here } close($sock);
|
|---|