title: Sort function in Perl
body: <p>Consider:</p>
  <pre><code>use warnings;
  
  my @a = (1, 11, 3, 5, 21, 9, 10);
  
  my @b = sort @a;
  
  print &quot;@b&quot;;
  </code></pre>
  <blockquote>
  <p>Output: 1 10 11 21 3 5 9</p>
  </blockquote>
  <p>Codepad link: <a href="http://codepad.org/Fvhcf3eP" rel="nofollow noreferrer">http://codepad.org/Fvhcf3eP</a></p>
  <p>I guess the <a href="https://perldoc.perl.org/perlfunc#sort-SUBNAME-LIST" rel="nofollow noreferrer">sort</a> function is not taking the array's elements as an integer. That is why the output is not:</p>
  <blockquote>
  <p>1 3 5 9 10 11 21</p>
  </blockquote>
  <p>Is it?</p>
  <p>How can I get the above result as output?</p>