Tiny Perl module that parses mirrored characters in a string and produces a tree