- or download this
for (@files) { #
open my $fh, '<', $_ or
(warn "$_: $!\n"), next;
push @first_lines, scalar <$fh>;
}
- or download this
#!/usr/bin/perl
...
print map <$_>, @p;
__END__
- or download this
my @p = map {
open my $fh, '-|', "ping -w 5 -c 5 $net$_"
or die "Couldn't start ping for $net$_: $!\n";
$fh } 1..255;