!/usr/bin/perl use strict; use warnings; use Data::Dumper; use IO::Socket; my $socket = IO::Socket::INET->new( PeerAddr => 'all.dict.org', PeerPort => '2628', Proto => 'tcp', Timeout => 1, ReuseAddr => 1, MultiHomed => 1, Blocking => 0); die ("Could not create socket: $!\n") unless $socket; $socket->send("CLIENT dict4perl\n"); my $buf; while (sysread($socket, $buf, 1024)) { print $buf; } print "Done\n"; 1;