You're viewing a comment by anonymous and its responses.

anonymous Permalink
October 10, 2008, 16:02

To ankush:

Note that perl DOES allow multiline comments, using POD syntax.

with sed, you can do this:

sed '\|/\*|,\|\*/|s/^/#/'

that assumes your comments always span more than one line (ie, the opening /* and the closing */ are on different lines). Otherwise, you can do this:

sed '\|/\*|{:a;s/^/#/;\|\*/|!{n;ba;}}'

(good luck reading that!)

Note that both solutions are VERY fragile, and will break under a number of conditions.

Reply To This Comment

(why do I need your e-mail?)

(Your twitter handle, if you have one.)

Type the word "floppy_95": (just to make sure you're a human)

Please preview the comment before submitting to make sure it's OK.