Great ... now you're getting somewhere!
The next step is to debug your results.
First of all, what happens when you do the ping by hand? To be on the safe side, you can formulate the whole command before executing it, so you can cut-and-paste:
my $cmd = "$ping $_ 2> /dev/null";
print "Debug: command is '$cmd'\n";
my $ping_out = `$cmd`;
So when you run that, you should get something like:
Debug: command is '/bin/ping myserver02 2> /dev/null'
What happens when you run that command (/bin/ping myserver02 2> /dev/null) at a shell prompt? Does running ping directly produce the output you expect?
If so, then try printing the output in the program, and compare it visually:
my $ping_out = `$cmd`;
chomp ($ping_out);
print "Debug: ping results => '$ping_out'\n";
Does it print the results you expect? (ie. the results you get doing it by hand?)
If there's a problem, you should now, most likely, know where it is. Perhaps the remote server is down. Or perhaps the output from ping isn't quite in a format that you expect.
What happens when you follow these steps? Are you able to find the bug and fix it?
s''(q.S:$/9=(T1';s;(..)(..);$..=substr+crypt($1,$2),2,3;eg;print$..$/
|