in reply to How do I strip lines prefixed by a "#"
while (<DATA>) { s/\s#.*//; next unless /\S/; do_something($_); } __DATA__ # This is my file # with a few lines of comments data=here # another comment more=data # more comments and=more # end of file
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: Answer: How do I strip lines prefixed by a
by Fastolfe (Vicar) on Oct 25, 2000 at 20:20 UTC |