Help for this page

Select Code to Download


  1. or download this
    open(IN, "bigfile.txt");
    while(<IN>){
    ...
    while(<IN>){
      &big_sub2($_);
    }
    
  2. or download this
    open(IN, "bigfile.txt");
    while(<IN>){
      &big_sub1($_);
      &big_sub2($_);
    }
    
  3. or download this
    use Benchmark;
    
    ...
    
    my $codehash = {'sub1' => \&sub1,'sub2' => \&sub2,'sub3' => \&sub3};
    timethese(5000000, $codehash);
    
  4. or download this
    sub1: 13 wallclock secs (12.80 CPU)
    sub2:  8 wallclock secs (8.24 CPU)
    sub3:  6 wallclock secs (6.66 CPU)