Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
use strict; use Text::Template; my $user_info = 'u1'; my $site = 'a'; my $string = './{$user_info}.{$site}.txt'; my $template = Text::Template->new(TYPE =>'STRING',SOURCE=>$string); $string = $template->fill_in({site=>$site,user_info=>$user_info}); print "$string\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Filling a string with Text::Template
by Corion (Patriarch) on Jun 12, 2019 at 09:25 UTC | |
by Anonymous Monk on Jun 12, 2019 at 09:50 UTC |