#!/usr/bin/perl use IO::Socket; my $machine_addr = 'localhost'; $sock = new IO::Socket::INET(PeerAddr=>$machine_addr, PeerPort=>7070, Proto=>'tcp', ); die "Could not connect: $!" unless $sock; foreach my $count(1..86400){ my $temp = 800 + int(rand 100); my $send = "$count $temp"; print $sock "$send\n"; print "$send\n"; select(undef,undef,undef,.1) ; } close ($sock); __END__