perlfaq5: skip comment line
[email protected] (Jerome Reybert) Thu, 30 Jun 2011 16:32:37 +0200
| Newsgroups | perl.perlfaq.workers |
|---|---|
| Message-ID | <[email protected]> |
Hi,
this is a suggestion for the perlfaq5. In this FAQ, you suggest to use
this command to skip commented lines when reading a file.
next if /^\s+#/; # skip comment lines
You should replace s+ by s*, since s+ will only take into account lines
with at least one space before #.
I know this is just an example. But if you just copy paste the line, it
can leads to errors.
Regards,
--
Jérôme