Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re: How do i search and extract commented lines from a file using perl?by Anonymous Monk |
on Jun 26, 2015 at 21:05 UTC ( [id://1132229]=note: print w/replies, xml ) | Need Help?? |
Just for fun, a quick one-liner solution using perl's "flip-flop" (range) operator.
Note that like several of the other solutions presented by other monks, this doesn't fully handle the case of the comment markers appearing in the middle of the lines.
In Section
Seekers of Perl Wisdom
|
|