PerlTEX couples two well-known worlds—the Perl programming language and the LATEX typesetting system. The resulting system provides users with a way to augment LATEX macros with Perl code, thereby adding programming capabilities to LATEX that would otherwise be difficult to express. In this paper, we illus- trate the use of PerlTEX with a variety of examples and explain the associated Perl code. Although Perl may perhaps be best known for its string manipula- tion capabilities, we demonstrate how PerlTEX indirectly provides support for “programming” graphics through the use of additional packages such as TikZ.
Mertz, Andrew and Slough, William, "Programming with PerlTEX" (2007). Faculty Research and Creative Activity. 41.