Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Golf: Fix de facto HTML comments (spoiler)

by blokhead (Monsignor)
on Jul 18, 2004 at 19:26 UTC ( #375414=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #2345678 1 2345678 2 2345678 3 2345678 4 2345678 5 
    s/<!--(.*?)-->/(my$x=$1)=~s!--!-!g;"<!--$x-->"/egs
    
  2. or download this
    #2345678 1 2345678 2 2345678 3 2345678 4 2345678 5 2345678 6 12
    s/<!--(.*?)-->/(my$x=$1)=~s!--!-!g;$x=~s!-$!!;"<!--$x-->"/egs