Q&A > regular expressions > How do I strip lines prefixed by a "#" contributed by Anonymous Monk
@code_lines = grep !/^#/, @all_lines;
The above code is taken directly from the Camel head book.
I have absolutely zero preference
Results (154 votes),