Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

perlfaq5: skip comment line

0 views
Skip to first unread message

Jerome Reybert

unread,
Jun 30, 2011, 10:32:37 AM6/30/11
to perlfaq...@perl.org
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

0 new messages