#!/usr/bin/env perl use strict; use warnings; use Template; my $from_db = q/Oh this year I'm off to Sunny [% country %]! /; my $tmpl = Template->new; for my $dest (qw/Greece Italy Spain/) { $tmpl->process (\$from_db, { country => $dest }); }
$from_db is the immutable thing (the template) which you store in and retrieve from the DB. We then use Template to perform the required modifications. Template is one of the "proper" ones as you can find it listed in Task::Kensho. There are others, of course.
🦛
In reply to Re^3: Why is this string only PARTIALLY interpolated?
by hippo
in thread Why is this string only PARTIALLY interpolated?
by misterperl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |