#!/usr/bin/perl -l use strict; use warnings; die "Usage: $0 \n" unless @ARGV == 1; # Rudimentary check on the argument (my $net=shift) =~ s/\.0+$/./ or die "Supply an IP of the form <#.#.#.0>\n"; print "Begun pings at " . localtime; my @p; open $p[$_], "-|", "ping $net$_ -c 10" or die "Couldn't start ping for $net$_: $!\n" for 1..255; shift @p; undef $/; print map <$_>, @p; __END__