in reply to Removing html comments with regex

Use the /s option to s/// to allow the period to match newlines as well. This works for my multiline comment test:
my $stuff = do { local $/; <DATA> }; $stuff =~ s/<!--.*?--\s*>//gs; print "$stuff\n"; __DATA__ asdfasdkf <!-- asdfaskdf --> Hello <!-- World -->
Please don't make me use the modules!
You make it sound like they're haunted or something...

Update: Hey, your second regex worked for this data. Are you sure it doesn't work for you?
Update2: The spec allows for whitespace between the closing -- and >: updated the regex accordingly.

blokhead