use perl5:Template; my $v = { string => "asdfas df asdf " }; my $t = Template.new; my $r; $t.process("hello", $v, VAR($r)); $r.say; # Below is a file named hello [% get string %]