Help for this page

Select Code to Download


  1. or download this
        $line_count = `wc -l $filename`
    
  2. or download this
        sub lines_in_file {
            my $f = shift;
    ...
            1 while <FH>;
            $.;
        }
    
  3. or download this
        my $line_count = lines_in_file($filename);