An example of string interpolation in Perl 5

sub starttext {
     my $self = shift;

    <<"PREAMBLE";
@{[$self->setuppagenumbering({location => "footer", style => "bold"})]}

@{[$self->setuphead("chapter,title",               {style => "\\ssbfd"})]}
@{[$self->setuphead("section,subject",             {style => "\\ssbfc"})]}
@{[$self->setuphead("subsection,subsubject",       {style => "\\ssbfb"})]}
@{[$self->setuphead("subsubsection,subsubsubject", {style => "\\ssbfa"})]}

@{[$self->setupbodyfont("xits")]}

@{[$self->setupcaption("table", {location => 'top'})]}
@{[$self->setuptabulate({header => "repeat"})]}

@{[$self->tex("starttext")]}
PREAMBLE
}