Welcome to the Monastery | |
PerlMonks |
Re: Parsing and editing a configuration fileby shmem (Chancellor) |
on Jun 23, 2019 at 15:04 UTC ( [id://11101764]=note: print w/replies, xml ) | Need Help?? |
I'd just be lazy and use a flip-flop.
Having the structure inline, I'd just split then into @lines and say for(@lines) { ... } More matching pairs can be introduced with nested if-blocks of the same form - if (m{...} ... m{...}) { ... }
perl -le'print map{pack c,($-++?1:13)+ord}split//,ESEL'
In Section
Seekers of Perl Wisdom
|
|