A
Arun
problem: excecutes only DATA string but nor IO1 and IO0.
script:
#!\usr\bin\perl -w
use IO::Socket;
use diagnostics;
use strict;
use POSIX qw(strftime);
my $remote_host = "";
my $remote_port = "";
my ($handle, $send_data,$send_i1,$send_i0,$count);
$count=0;
$handle= IO::Socket::INET->new( PeerAddr => $remote_host,
PeerPort => $remote_port,
Proto => "tcp",
Type => SOCK_STREAM
)
|| die "Couldn't connect to $remote_host:$remote_port: \n";
print STDERR "[Connected to $remote_host:$remote_port]\n";
DATA: while(<$handle=1>)
{
for($count=0;$count<180;$count++)
{
$send_data = self define string;
$handle-> send($send_data);
$count=0;
sleep(180);
}
}
IO1: while(<$handle=1>)
{
for($count=0;$count<240;$count++)
{
$send_i1 = self defined string
$handle-> send($send_i1);
$count=0;
sleep(240);
}
}
IO0: while(<$handle=1>)
{
for($count=0;$count<360;$count++)
{
$send_i0 = self defined string;
$handle-> send($send_i0);
$count=0;
sleep(360);
}
}
script:
#!\usr\bin\perl -w
use IO::Socket;
use diagnostics;
use strict;
use POSIX qw(strftime);
my $remote_host = "";
my $remote_port = "";
my ($handle, $send_data,$send_i1,$send_i0,$count);
$count=0;
$handle= IO::Socket::INET->new( PeerAddr => $remote_host,
PeerPort => $remote_port,
Proto => "tcp",
Type => SOCK_STREAM
)
|| die "Couldn't connect to $remote_host:$remote_port: \n";
print STDERR "[Connected to $remote_host:$remote_port]\n";
DATA: while(<$handle=1>)
{
for($count=0;$count<180;$count++)
{
$send_data = self define string;
$handle-> send($send_data);
$count=0;
sleep(180);
}
}
IO1: while(<$handle=1>)
{
for($count=0;$count<240;$count++)
{
$send_i1 = self defined string
$handle-> send($send_i1);
$count=0;
sleep(240);
}
}
IO0: while(<$handle=1>)
{
for($count=0;$count<360;$count++)
{
$send_i0 = self defined string;
$handle-> send($send_i0);
$count=0;
sleep(360);
}
}