Help for this page

Select Code to Download


  1. or download this
    my ($server, @data) = (split(“,”,$line));
    
  2. or download this
    my ($server, $data) = (split(“,”,$line));
    
  3. or download this
    my ($server, $data) = split ',', $line, 2;
    
  4. or download this
       if ($data[0] lt “!” )  {
          $data[0] = 0;
       }
    
       next if grep /[^0-9.]/, @data;
    
  5. or download this
        next if $data =~ /[^0-9.]/;
    
  6. or download this
        push @{$usage{$server}}, 0 while @{$usage{$server}} < $files;
        push @{$usage{$server}}, $data[0];
    
  7. or download this
        $usage{$server}->[$files] = $data unless $usage{$server}->[$files]
    
  8. or download this
      continue {
        $files++ if eof;
      }
      close $fh or die "Can’t close file $file: $!";
    
  9. or download this
    my $files = 0;
    for my $file ("sfull1ns.dat","sfull2ns.dat","sfull3ns.dat")  {
    ...
      $files++
      close $fh or die "Can’t close file $file: $!";
    }
    
  10. or download this
    print "$_," . (join ',', @{$usage{$_}}) . "\n" for (keys %usage);
    
  11. or download this
    for (keys %usage) {
      for my $f (0,1,2) {
        $usage{$_}->[$f] = 0 unless defined $usage{$_}->[$f];
    } }