title: perl regex: replace placeholder with variable content in template
body: <p>i have some template string and some variables. 
  for example something like the following:</p>
  
  <pre><code>my $template = " text &lt;--Name--&gt; some other text &lt;--Age--&gt; ...";
  my $age = 15;
  my $name = "heinz";
  </code></pre>
  
  <p>What is the correct Regex to replace the template placeholder strings with the corresponding perl variable?</p>
  
  <p>I tried with </p>
  
  <pre><code>$template =~ s/&lt;--(.*?)--&gt;/eval('$' . lc($1))/sge;
  </code></pre>
  
  <p>but it does not work. The placeholder were replaced by an empty string.
  I hope somebody has an idea.
  Thanks in advance.</p>