in reply to Pattern String Matching while parsing a file

For a simple literal match in a string, look at the index builtin function.

As a side note, please note that it is probably unnecessary to chomp your input line if you're just going to add "\n" to it immediately after.

  • Comment on Re: Pattern String Matching while parsing a file