title: How can I reorder substrings in a string?
body: <p>How do I do the following conversion in regex in Perl?</p>
  
  <pre><code>British style   US style
  "2009-27-02" =&gt; "2009-02-27"
  </code></pre>
  
  <p>I am new to Perl and don't know much about regex, all I can think of is to extract different parts of the "-" then re-concatenate the string, since I need to do the conversion on the fly, I felt my approach will be pretty slow and ugly. </p>