in reply to Re: Regular Expressions to ignore lines starting with #
in thread Regular Expressions to ignore lines starting with #
next if /^#/;
I'd likely do it similarly but I'd change the regex a bit. Using /^\s*#/ will skip lines where the first non-whitespace character is an octothorpe, not just the first character. That's usually how comments are defined.
-sauoq "My two cents aren't worth a dime.";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Regular Expressions to ignore lines starting with #
by zengargoyle (Deacon) on May 19, 2003 at 18:49 UTC | |
by sauoq (Abbot) on May 19, 2003 at 20:22 UTC | |
|
Re: Re: Re: Regular Expressions to ignore lines starting with #
by Skeeve (Parson) on May 20, 2003 at 07:00 UTC | |
by lanier (Initiate) on May 20, 2003 at 12:51 UTC |