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


in reply to Golf: Fix de facto HTML comments

here's 56. I used a period since the other char acted funky in my editor.

edit: trimmed two chars, removed unneccessary character replacements.
#2345678 1 2345678 2 2345678 3 2345678 4 2345678 5 23456 s/<!--(.*?)-->/(my$x=$1)=~s!-(-?)!$1.!g;"<!--$x-->"/egs;

two chars less, 54:
#2345678 1 2345678 2 2345678 3 2345678 4 2345678 5 23456 s/<!--(.*?)-->/($_=$1)=~s!-(-?)!$1.!g;"<!--$_-->"/egs;

makes less changes, but adds to 55:
#2345678 1 2345678 2 2345678 3 2345678 4 2345678 5 23456 s/<!--(.*?)-->/($_=$1)=~s!-(-+?)!$1.!g;"<!--$_-->"/egs;