title: How do I repeat a character n times in a string?
body: <p>I am learning Perl, so please bear with me for this noob question. </p>
  
  <p>How do I repeat a character n times in a string? </p>
  
  <p>I want to do something like below:</p>
  
  <pre><code>$numOfChar = 10;
  
  s/^\s*(.*)/' ' x $numOfChar$1/;
  </code></pre>