#!/usr/bin/perl use Net::Ping; my @host_array = ( '1.2.3.4', ... ); my @up; $" = "\n"; my $p = Net::Ping->new( "syn", 5 ); $p->{port_num} = 7; $p->ping($_) for (@host_array); while ( my ( $host, $rtt, $ip ) = $p->ack ) { push @up, $ip; } print @up;
In reply to Re: Net::Ping with threads
by borisz
in thread Net::Ping with threads
by Spesh00
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |