title: Perl script to skip a line
body: <p>I have YAML file as input. In input file, I have sales and sales($) rows. I need to take only one row as output.<br>
  Logic: </p>
  
  <ol>
  <li>if sales($) row is present then we need to take this row. </li>
  <li>If Both Sales($) and Sales rows are present then we need sales($) row.</li>
  <li>If Sales row is present then we need sales row.(Only if sales row present)</li>
  </ol>
  
  <p>Can anyone guide how to achieve this perl 5?</p>
  
  <p>My Input File Looks like...   </p>
  
  <pre><code>---
  Order ID: W00875205405667
  Sales($): '7.5'
  Transaction Datetime: 2015-03-29 16:17:00
  ---
  Order ID: W00875205405668
  Sales: '74.50'
  Sales($): '72.5'
  Transaction Datetime: 2015-03-29 16:17:00
  ---
  Order ID: W00875205405669
  Sales: '12.50'
  Transaction Datetime: 2015-03-29 16:17:00
  ---
  </code></pre>
  
  <p>Need Output File as:</p>
  
  <pre><code>---
  Order ID: W00875205405667
  Sales: '7.5'
  Transaction Datetime: 2015-03-29 16:17:00
  ---
  Order ID: W00875205405668
  Sales: '72.50'
  Transaction Datetime: 2015-03-29 16:17:00
  ---
  Order ID: W00875205405669
  Sales: '12.50'
  Transaction Datetime: 2015-03-29 16:17:00
  ---
  </code></pre>