Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Answer: How do I strip lines prefixed by a

by Anonymous Monk
on Apr 03, 2001 at 23:15 UTC ( #69427=categorized answer: print w/replies, xml ) Need Help??

Q&A > regular expressions > How do I strip lines prefixed by a "#" - Answer contributed by Anonymous Monk

Use grep:

@code_lines = grep !/^#/, @all_lines;

The above code is taken directly from the Camel head book.

Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
[marto]: Re: Monastery login over http
[Corion]: Veltro: This is due to the fact that one of our webservers doesn't have "our" https certificate but another https certificate. Work is underway (well, on my long, long to-do list) to switch even that server over to "our" certificate
[Veltro]: Corion OK, thanks. At least I understand it now.

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (12)
As of 2018-05-23 11:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?