Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

Re^4: Ping sweep with reporting

by StarkRavingCalm (Sexton)
on May 17, 2007 at 20:14 UTC ( #616104=note: print w/replies, xml ) Need Help??

in reply to Re^3: Ping sweep with reporting
in thread Ping sweep with reporting

Ok, here's what I have: <code> #!/usr/bin/perl use strict; use warnings; my $ping = "/bin/ping"; while (<DATA>) { chomp; my $ping_out = `$ping $_ 2> /dev/null`; chomp ($ping_out); if ($ping_out !~ /bytes from/) { print "$_ isn't pinging\n"; } else { print "$_ is up\n"; } } __DATA__ myserver02 <code/> And here's the output: root@stewie ~# perl isn't pinging Thoughts?

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://616104]
[erix]: how does one find out how to install a program like cvsgrep
[erix]: I mean, I suppose it's just the one file so I can download that
[erix]: Makefile.PL should tell me, probably

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (4)
As of 2017-06-22 16:44 GMT
Find Nodes?
    Voting Booth?
    How many monitors do you use while coding?

    Results (524 votes). Check out past polls.