in reply to Parsing and editing a configuration file

Hi,

Turning something like that into a walkable tree doesn't take much

Maybe see

Re: Perl regex \G /g and /gc, Re^2: POD style regex for inline HTML elements, Re: Breaking up a text file to make a Makefile

while( length( $$dataref ) > pos( $$dataref ) ){ $$dataref =~ m{\G^(#.*$)}gcm and do { push @matches, [ "COMMENT", $1 ]; TRACE "# COMMENT $1"; next; };; m{\G([\<\>])}gcmx and do { TRACE "## $dent error-stray<> { $1 } at pos(@{[pos]})"; last inlineLOOP; };;;