> $!=1;
$! contains error text, if I remember correctly off the top of my head.
Use $| = 1 instead for autoflush. This shouldn't cause redirect
problems, tho.
> use Net::Ping;
> @host_array = <DATA>;
> $p = Net::Ping->new("icmp");
> $p->bind("192.168.2.211"); # Specify source interface of pings
> foreach $host (@host_array) {
> chomp($host);
> print "$host is ";
> print "NOT " unless $p->ping($host, 2);
> print "reachable.\n";
> }
> $p->close();
Are you running this on Windows? I've noticed redirect weirdness with
Windows at times.
Otherwise everything looks OK.
Luke
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]