use IO::Socket; use strict; my $LOCALPORT=2000; my ($newmsg,$MAXLEN,$TIMEOUT); $MAXLEN=5151; $TIMEOUT=5; while (1) { my $counter=10; while ($counter>0) { print "Sending in: ".$counter."\n"; $counter--; sleep 1; } print "Sending!\n\n"; my $sock= IO::Socket::INET->new(Proto => 'tcp', PeerPort=>'2500', PeerAddr=>'192.168.110.253') or warn "Socket: $@\n"; if ($sock) { print $sock "192.168.250.13:13"; close ($sock); } }