in reply to Net::Ping with threads
#!/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;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Net::Ping with threads
by Spesh00 (Initiate) on Mar 15, 2005 at 19:50 UTC |