http://www.perlmonks.org?node_id=202750


in reply to Balanced delimiter parsing

If you want to use XML::Parser and it's ilk then you should just download a binary version of it and copy the the right files to the appropriate places. If however, you can't find a binary version of XML::Parser and you really are stuck up the proverbial creek then you might want to check out the extract_tagged method in Text::Balanced. From the docs:
# Extract the initial substring of $text that is bounded by # a C<BEGIN>...C<END> pair. Don't allow nested C<BEGIN> tags ($extracted, $remainder) = extract_tagged($text,"BEGIN","END",undef,{bad=>["BEGIN"]});

HTH

_________
broquaint