in reply to Testing for live IP's

Since no-one beat me to it, look at nmap. It was designed to do this sort of thing. nmap -sP $HOST as root will do an ICMP ping, a TCP port 80 ping, and a SYN ping.

Plus, you can use it from perl!