My doings are:
Read about 600 IP's from a MySQL Database put them in a socket array and proof the sockets.
Thats work pretty fine!!!
But there are some problems putting the collected data back to the database.
I use an array to collect the data here is an example:
foreach(@somedata)
{
$container[$read_set->peerhost()] = $somedata;
}
# Now i want to show the collected data from the last operation. to the screen. Later put this in the database.
my $i = 0;
foreach(@ip)
{
print $ip[$i].$container[$ip[$i]]
$i++;
}
# Screen output
80.132.212.155=|XXXXXXXXXXXX
62.143.17.160 =|XXXXXXXXXXXX
80.145.179.151=|XXXXXXXXXXXX
242.63.170.85 =|XXXXXXXXXXXX
217.81.57.164 =|XXXXXXXXXXXX
# There are someproblems!!!
This row is defenetly correct:
217.81.57.164=|XXXXXXXXXXXX
but look at the others here are the real values.
80.132.212.155=|HHHHHHHHHHHH
62.143.17.160 =|CCCCCCCCCCCC
80.145.179.151=|242.63.170.85 =|ZZZZZZZZZZZZ
I looked back to this
$container[$read_set->peerhost()] = $somedata;
and noticed that there is a problem with $read_set->peerhost() when i use print $read_set->peerhost(); i get the correct ip from any server. But when i do this
my $dummy = $read_set->peerhost();
print split($dummy,"."
;
i get this
Screen output:
1
1
1
1
1
I do not understand this because there have to be the ip addresses withous doted seperators
could someone may help me please
Read about 600 IP's from a MySQL Database put them in a socket array and proof the sockets.
Thats work pretty fine!!!
But there are some problems putting the collected data back to the database.
I use an array to collect the data here is an example:
foreach(@somedata)
{
$container[$read_set->peerhost()] = $somedata;
}
# Now i want to show the collected data from the last operation. to the screen. Later put this in the database.
my $i = 0;
foreach(@ip)
{
print $ip[$i].$container[$ip[$i]]
$i++;
}
# Screen output
80.132.212.155=|XXXXXXXXXXXX
62.143.17.160 =|XXXXXXXXXXXX
80.145.179.151=|XXXXXXXXXXXX
242.63.170.85 =|XXXXXXXXXXXX
217.81.57.164 =|XXXXXXXXXXXX
# There are someproblems!!!
This row is defenetly correct:
217.81.57.164=|XXXXXXXXXXXX
but look at the others here are the real values.
80.132.212.155=|HHHHHHHHHHHH
62.143.17.160 =|CCCCCCCCCCCC
80.145.179.151=|242.63.170.85 =|ZZZZZZZZZZZZ
I looked back to this
$container[$read_set->peerhost()] = $somedata;
and noticed that there is a problem with $read_set->peerhost() when i use print $read_set->peerhost(); i get the correct ip from any server. But when i do this
my $dummy = $read_set->peerhost();
print split($dummy,"."
i get this
Screen output:
1
1
1
1
1
I do not understand this because there have to be the ip addresses withous doted seperators
could someone may help me please