in reply to Ping loop doesn't print
See perlvar's entry on $|#!/usr/bin/perl use strict; use warnings; use Net::Ping; $|=1; # note this line my $i = $ARGV[0] || -1; while(--$i){ my $p = Net::Ping->new(); my $host = "127.0.0.1"; # for testing purposes $p->ping($host) and print "\n$host lives!\n"; $p->close(); print "."; }
|
|---|