Help for this page

Select Code to Download


  1. or download this
    for (@files) {  #
        open my $fh, '<', $_ or 
          (warn "$_: $!\n"), next;
        push @first_lines, scalar <$fh>;
    }
    
  2. or download this
    #!/usr/bin/perl
    
    ...
    print map <$_>, @p;
    
    __END__
    
  3. 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;