in reply to Re^2: Why is this string only PARTIALLY interpolated?
in thread Why is this string only PARTIALLY interpolated?
#!/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.
🦛
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Why is this string only PARTIALLY interpolated?
by misterperl (Friar) on Aug 09, 2023 at 13:40 UTC |