in reply to Re: Re: regex confusion
in thread regex confusion

The error you're seeing is a result of perl getting confused about which parts of your code are inside a substitution, and which are outside. Look for a regex, somewhere before line 257, where you're matching a slash, and forgot to escape it with a backslash.

When you're matching slashes inside a regex, it's helpful to use a different delimiter for the regex, as in m,</html>, or s!</H1>!}\n! . This saves you from having to use all those backslashes.

But, as wog said, it really would be best to use an HTML parsing module.