Help for this page

Select Code to Download


  1. or download this
    my @lines;
    while(@lines < $n)
    ...
      @lines = grep/criteria/,split/\n/,`tail -n $i file.foo`;
      $i+=$n;
    }
    
  2. or download this
    my @file = <FILEHANDLE>;
    for(@file)
    ...
      push @lines,$_ if /criteria/;
      last if @lines>$n;
    }