Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
Re: match multi-lines from config fileby GrandFather (Saint) |
on Aug 06, 2007 at 22:57 UTC ( [id://630921]=note: print w/replies, xml ) | Need Help?? |
Use open to open a file handle then use:
to scan the file. Use index or a regular expression match to skip (using next) until the interface line is found. Skip until the description line is found:
Process the description then use the same technique for the rest of the lines you need to match. DWIM is Perl's answer to Gödel
In Section
Seekers of Perl Wisdom
|
|