Help for this page

Select Code to Download


  1. or download this
    while (<LOG>) {
        my ($source, $sport, $to, $dport, $proto, $packs, $bytes) = split;
    ...
        }
        $total += $bytes;
    }
    
  2. or download this
    perl -e '$k="aaaaa";
     for $i (1..1_000_000)
    ...
     {$h1{$k}={foo=>"bar",bar=>"foo"}; $h2{$k}++; $h3{$k}=$i; $k++}
     sleep 20'
    ## consumes 360 MB in ~16.5 sec