http://www.perlmonks.org?node_id=1050333


in reply to Re^3: Reading through a file and checking for a specific string
in thread Reading through a file and checking for a specific string

While it is possible to skip the zero matches, however, it may actually better to include them.
That way you distinguish between "searched but not found" and "not searched at all".
  • Comment on Re^4: Reading through a file and checking for a specific string