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


in reply to search and replace confusion

Your input contains:

<!-monthstart--><option value="01">January </option>\n

Your substitution looks for:

s/<!--monthstart-->.*<!--monthend-->/MONTHS<br>\n/s;

Spot the discrepancy :)

--
<http://dave.org.uk>

"The first rule of Perl club is you do not talk about Perl club."
-- Chip Salzenberg