title: How to sort numbers in Perl
body: <pre><code>print &quot;@_\n&quot;;
  4109 4121 6823 12967 12971 14003 20186
  </code></pre>
  <p>How do I sort it in Perl?</p>
  <p>Using <code>@sorted = sort(@_);</code> gives me an alphabetical ordering:</p>
  <pre><code>13041 13045 14003 20186 4109 4121 6823
  </code></pre>
  <p>How do I get a numerical ordering? Does Perl have built-in functions for merge-sort, insertion-sort, etc.?</p>