in reply to Perl question, icmp script.
This code is so muddled that, even though the sub names indicate what is wanted in general, the details are completely opaque.
You might like to explain why you need hashes for count and recovered. It is unusual to use eq for numeric comparisons and bad practice to use an equality test on numeric values when >= or <= are safer (and may fix some of your troubles in this case).
You should always place use strict; use warnings; at the start of your Perl scripts. They do no harm and can save you a lot of grief!
You could replace the Ping with a ReadKey (see Term::ReadKey) to make debugging easier and to make it easier for others to reproduce your results.
|
|---|