title: How to change selected values in text file using Perl
body: <p>I need help to write some Perl code to replace some selected values in text files.  Below is the sample of my text files.  I want to replace the value of "end" to a new value in the date format YYYYMMDD, increase the key value by 1, and the rest should remain the same.</p>
  
  <p>Source File:</p>
  
  <pre><code>    server=host1
      network=eth0
      start=YYYYMMDD
      end=YYYYMMDD
      key=34
  </code></pre>
  
  <p>If I change the "end" value to yyyymmdd (new date) and "key" to +1. the output result should be:</p>
  
  <pre><code>    server=host1
      network=eth0
      start=YYYYMMDD
      end=yyyymmdd
      key=35
  </code></pre>
  
  <p>Please suggest a solution for this.</p>