tgus:
Thanks for the kind words, I'm glad I could help. And just in case it DIDN'T go without saying: anytime.
--jim
three:
You said:
What is the $socket=IO::Socket::INET ->new(%host) part doing??
My Response:
That's the code that tries to create a socket connection. If it fails, then that means that it could not connect.
You said:
And what does ${host}:${port} represent??, Are these aliases??
My Response:
I'm guessing your referring to this line:
push @good_hosts, "${host}:${port}";
What it's doing is creating a string, and then pushing that string into the array @good_hosts. It's equivelent to this code which may make the intent more obvious:
$new_value = $host . ":" . $port;
push @good_hosts, $new_value;
The braces are there (in the original line) to make sure that perl new what variables I was trying to say. Look at this:
$verb = "run";
print "I was $verbing";
This won't work becuase perl is looking for a variable called $verbing. It doesn't know I meant $verb followed by ing. So I have to 'disambiguate' with the braces:
print "I was ${verb}ing";
Hope that helps.
--jim