Escaping in PL/Perl and support functions