Ищем работающие хосты в сети PERL
use strict;use Socket;use Net::Ping;my $subnet="195.138.96.*";if ($host=~/(\d+)\.(d+)\.(\d+)\.\*/)) { my $i for ($i=0 ; $i"my $p= Net:: Ping->new("ICMP");my $ok= $p->ping("$a,$b,$c,$d");$p->close();if (!defined $ok) { print "failed (host/ip invalid)\n"; } elseif (!$ok) { print "failed (host unreachable)\n";} else { my $name=gethostbyaddr(pack(''C4'',$a,$b,$c,$d), PF_INET);print "$name\n";}}