in reply to Get data from a file and put it in a Tk Entry

What kind of server are you connecting to, and is there a protocol involved (like HTTP) to get the data? Or does the data just start coming once you make a connection?

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);