Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl use strict; use warnings; use Net::Ping; my $i = $ARGV[0] || -1; while(--$i){ my $p = Net::Ping->new(); my $host = int(rand(255)) . '.' . int(rand(255)) . '.' . int(r +and(255)) . '.' . int(rand(255)); $p->ping($host) and print "\n$host lives!\n"; $p->close(); print "."; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Ping loop doesn't print
by Joost (Canon) on Jun 01, 2007 at 21:10 UTC | |
|
Re: Ping loop doesn't print
by MidLifeXis (Monsignor) on Jun 01, 2007 at 21:08 UTC | |
by Anonymous Monk on Jun 01, 2007 at 21:19 UTC |