in reply to My Ping attempt in perl

This may be more complicated than what you are looking for,
but check out WhichHost AKA pingtest.pl
I ping $available_firewall using `ping` and check for
a pattern match in the results.