in reply to Modify C comment removal code to kill newlines
Hi,
here is another solution.
use Regexp::Common qw/comment/; local $/; $_ = <DATA>; s/$RE{comment}{C}\n*//gm; print; __DATA__ /* I have good commenting style */ i = 1; /* And I comment every line of code */ i++; /* Even if it's pointless */ j = i; j++;
Boris
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Modify C comment removal code to kill newlines
by anjiro (Beadle) on Aug 21, 2006 at 14:32 UTC | |
by borisz (Canon) on Aug 21, 2006 at 15:37 UTC | |
by anjiro (Beadle) on Aug 21, 2006 at 17:24 UTC |
In Section
Seekers of Perl Wisdom