# Like tcp protocol, but with many hosts $p = Net::Ping->new( "syn" ); $p->port_number( getservbyname( "http", "tcp" ) ); ### send all the pings first foreach $host ( @host_array ) { $p->ping( $host ); } ### Then check which hosts responded. while( ( $host, $rtt, $ip ) = $p->ack ) { print "HOST: $host [$ip] ACKed in $rtt seconds.\n"; }