Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Pattern Matching Confusion

by Codon (Friar)
on Aug 11, 2005 at 17:03 UTC ( #483039=note: print w/replies, xml ) Need Help??

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++;
         }
       }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://483039]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (5)
As of 2018-02-24 12:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    When it is dark outside I am happiest to see ...














    Results (310 votes). Check out past polls.

    Notices?