title: convert "Yes" or "No" to boolean
body: <p>I want to parse user values contained in .CSV file. I don't want my users to enter  "Yes" or "No" but instead enter "True" or "False". In each case I want to  convert to the equivalent boolean values: <code>$true</code> or <code>$false</code>. Ideally I would like a default value, so if there's  misspelt "Yes or "No" I would return my default value: <code>$true</code> or <code>$false</code>.</p>
  
  <p>Hence, I wondered if there is a neat way of doing this other than</p>
  
  <pre><code>if(){} else (){}
  </code></pre>