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