Help for this page

Select Code to Download


  1. or download this
       while ($record = <INPUTFILE>) {
          $_ = $record;
    ...
             $matchesFound = $matchesFound + 1;
         }
       }
    
  2. or download this
      while (<INPUTFILE>) {
        ++$matchesFound && print if (/$searchString/);
      }
    
  3. or download this
       while ($record = <INPUTFILE>) {
          if ($record =~ /$searchString/) {
    ...
             $matchesFound++;
         }
       }