title: replace part of first line in a multi line string
body: <p>I have a file with multiple lines. I read the file using read_file and put the entire string into a scalar string.</p>
  
  <p>My Sample file format,</p>
  
  <pre><code>From : test@gmail.com
  To : test1@gmail.com
  Subject : Test Mail
  </code></pre>
  
  <p>and so my string will be like this,</p>
  
  <pre><code>$mystring = "From : test@gmail.com\nTo : test1@gmail.com\nSubject : Test Mail"
  </code></pre>
  
  <p>These are template files already generated with random address in From and To field. I want to change the From field alone with the custom one as below,</p>
  
  <pre><code>$mystring = "From : user1@yahoo.com\nTo : test1@gmail.com\nSubject : Test Mail"
  </code></pre>
  
  <p>All I have to do is search and replace the From field in a multi line string using perl. I am new to perl and don't have great exposure to it.</p>