title: Find and replace with a formatted string in perl
body: <p>I have a file that looks like this:</p>
  
  <p>myFile</p>
  
  <pre><code>Hello     World
  Hello     World
  Hello     World
  Hello
  Hello
  Hello     World
  Hello     World
  </code></pre>
  
  <p>What I want to do is a find and replace of any line in the file that has just the word "Hello" with the string "Hello World", keeping the spacing the same as what's already in the file (let's say 10 characters width from the H to the W).</p>
  
  <p>What I have so far:</p>
  
  <pre><code>perl -pi -e 's/Hello/Hello World/' myFile
  </code></pre>
  
  <p>I know I didn't get far but I have been Googling this for quite some time and can't figure out what I need to do..</p>
  
  <p>Any help is greatly appreciated!! Thanks!!</p>