Perl has multi-line strings, customisable string delimiters (e.g.
qq!!) and even nestable string delimiters (e.g.
qq{}), making it a great language to use to generate code. It also has strong
templating and
XML parsing tools. It would truly be an excellent choice.