Got everything working in MarkLogic that I had in Perl