http://qs321.pair.com?node_id=573784


in reply to how do I print content of a cpp file without cpp comments?

perl -ne '($f.=$_)=~s;//.*$;;;END{$f=~s;/\*.*\*/|^\s*$;;gsm;print $f}' test.c