in reply to C style multiple line comment removal

Well, if you're reading the file main.c and then doing the regex operation then I will go with this:
$str = <FILEHANDLE>; while($str=~s/\/\*(.*?)\*\///gixm){ print $str; }

Replies are listed 'Best First'.
Re^2: C style multiple line comment removal
by prassi (Acolyte) on Jun 08, 2012 at 08:27 UTC

    This method dint remove the comment of the first 3 lines of the code. I have tried this, as I can read only single line from the file removal from the 2nd line is a problem