title: Better way to sort an array with unusual value
body: <p>I have this array:</p>
  
  <pre><code>@raw_stack = (
      '900244~dfasdf~ddd3',
      '900122~dfasdf~ddd1',
      '900244~dfasdf~ddd2',
      '900456~dfasdf~ddd4',
      '900312~dfasdf~ddd3',
      '900456~dfasdf~ddd5',
      );
  </code></pre>
  
  <p>I'd like to sort it by the first '~' element.
  Is there a more elegant way to solve this rather than
  looping and splitting through each value?</p>