  We present a novel concept of universal text preprocessing and text-embedded
programming (PTEP). Preprocessing and text-embedded programming has been widely
used in programming languages and frameworks in a fragmented and mutually
isolated way. The PTEP ideas can be found in the implementation of the \TeX\
typesetting system; they are prominent in PHP and similar web languages, and
finally they are used in the Jupyter data science framework. This paper
presents this area of research and related work in a more unified framework,
and we describe the implemented system Starfish that satisfies the following
novel principles of PTEP: universality, update and replace modes, flexiblity,
configurability, and transparency. We describe the operating model and design
of Starfish, which is an open-source system implementing universal
preprocessing and text-embedded programming in Perl. The system is transparent
and its design allows direct implementation in other programming languages as
well.
