title: Appending a string variable to a fixed string in Perl
body: <p>I have a variable that is entered at a prompt:</p>
  
  <pre><code>my $name = &lt;&gt;;
  </code></pre>
  
  <p>I want to append a fixed string <code>'_one'</code>to this (in a separate variable). </p>
  
  <p>E.g. if <code>$name = Smith</code> then it becomes <code>'Smith_one'</code></p>
  
  <p>I have tried several various ways which do not give me the right results, such as:</p>
  
  <pre><code>my $one = "${name}_one";
  </code></pre>
  
  <p>^ The <code>_one</code> appears on the next line when I print it out and when I use it, the _one is not included at all.</p>
  
  <p>Also:</p>
  
  <pre><code>my $one = $name."_one";
  </code></pre>
  
  <p>^ The <code>'_one'</code> appears at the <em>beginning</em> of the string.</p>
  
  <p>And: </p>
  
  <pre><code>my $end = '_one';
  my $one = $name.$end;
  or 
  my $one = "$name$end";
  </code></pre>
  
  <p>None of these produce the result I want, so I must be missing something related to how the input is formatted from the prompt, perhaps. Ideas appreciated!</p>