http://www.perlmonks.org?node_id=239087


in reply to How do I strip lines prefixed by a "#"

perl -pi.bak -e 's/^#.*\n//' <file>