title: Updating Record with incremental file in perl or powershell
body: <p>I have a text file which contains all historical data. From next day i start receiving the incremental files which can have new records as well as the updated records from the historical file.</p>
  
  <p>lets say I have historical data:</p>
  
  <pre><code>ID|NAME|COUNTRY
  ----------
  1|BRAD PITT|USA
  2|GEORGE CLOONEY|USA
  3|RAJESH KHANNA|INDIA
  </code></pre>
  
  <p>Next day i recieve a file </p>
  
  <pre><code>ID|NAME|COUNTRY
  ----------
  1|BRAD PITT|CANADA
  4|DANIEL RADCLIFFE|UK
  </code></pre>
  
  <p>I want to create a new file with </p>
  
  <pre><code>ID|NAME|COUNTRY
  ----------
  1|BRAD PITT|CANADA
  2|GEORGE CLOONEY|USA
  3|RAJESH KHANNA|INDIA
  4|DANIEL RADCLIFFE|UK
  </code></pre>
  
  <p>ID is the key here, delimiter is constant thruoghout the file.</p>
  
  <p>It can be easily achieved with any database tool but unfortunately my new Job needs it to be achieved with Scripting(Perl/Powershell), which I am not very good at.</p>
  
  <p>I appreciate any help.</p>