Fping does a “fast ping” of a list of hosts. It’s set up as a scripting-friendly tool, with output that’s easy to parse. Supply a list of target IPs at the command line, or use an input file. Then fping will (very quickly) ping each IP in series without waiting for a response. If a host responds, it’s up and ready to exploit.
Take note of the very nice Perl script example on the man page.
Network Mapping: Identifying Live Hosts