in reply to Net::Ping with threads
use strict; use Net::Ping; $|++; my $net = '194.153.145.'; my @hosts = 1..254; $_ = $net.$_ for @hosts; my $p = Net::Ping->new("icmp"); $p->{'timeout'} = 0.003; for (@hosts) { print "$_ is "; print "NOT " unless $p->ping($_); print "reachable.\n"; } print time - $^T
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Net::Ping with threads
by Spesh00 (Initiate) on Mar 15, 2005 at 20:59 UTC |