Eliya , your code provide some improvements in the performance it dont take 5 minutes anymore it takes between 30sec and 2minutes , is there anyway to make this faster? Thanks!
Here is my code now
my $socket = new IO::Socket::INET (
PeerAddr => '192.168.11.244',
PeerPort => '6008',
Proto => 'tcp',
);
die "Couldn't connect: $!\n" unless $socket;
$data = pack("CccccccCcCC",02,65,63,80,81,76,86,03,100,13,10);
if ( $socket )
{
print $socket $data ;
my $len = 131;
my $resp = '';
while ( sysread $socket, $_, $len ) {
$resp .= $_;
last if length($resp) == $len;
}
print "$resp\n";
}
close($socket);
|