I'm guessing that you are referring to Advent's 3B2 macro language. You can find some documentation at
http://documentation.3b2.com but I don't know of any perl modules for working with it. I guess this is an opportunity for you to write one. ;-)
-sauoq
"My two cents aren't worth a dime.";