in reply to Re^2: Extracting pattern from a file
in thread Extracting pattern from a file

For dealing with the comments, I would just wipe out the comment part of each line immediately after reading it. You could do this either using the s/// operator (see the section Regexp Quote-Like Operators in perlop), or using index and substr. The former would be the more "perlish" solution. The latter might look more familiar to you if you come from a language such as C.

-- 
Ronald Fischer <ynnor@mm.st>