[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] Counting the number of lines in a document



On Fri, 26 Apr 1996, Bart Lateur wrote:

      > while (<>) {
      >    $count++;
      > }

  Even lighter weight is:

    while (<>) {}

  After which the variable $. will contain the value you seek.

  Jim Flanagan <jimfl@ccd.bnl.gov>
  Computing and Communications
  Brookhaven National Laboratory
  http://pubweb.bnl.gov/~jimfl