Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
Re: Capture uncommented keywordsby atcroft (Abbot) |
on Jul 27, 2015 at 20:59 UTC ( [id://1136516]=note: print w/replies, xml ) | Need Help?? |
I cannot use CPAN or any other libraries. Actually, Yes, even you can use CPAN. If nothing else, you could copy code from a module and put it directly in your script, although you would not benefit from potential bug fixes, etc. (I would question why this artificial limitation exists, however.) As to the main question, it seems like the easiest thing would be to first remove comment lines (using either regexes or, more likely, a state machine), then process the remainder. Hope that helps.
In Section
Seekers of Perl Wisdom
|
|