title: Is there any guarantee that results of globbing will be sorted in Perl?
body: <p>Is there any guarantee that the array of filenames returned from a glob (e.g. <code>&lt;*&gt;</code>) will be sorted?</p>
  
  <p>I can't find that sorting is mentioned one way or the other <a href="http://perldoc.perl.org/functions/glob.html" rel="noreferrer">in the documentation</a>, but it seems to be the case in every directory I've tried it on.</p>
  
  <p>I'm talking about using this syntax:</p>
  
  <pre><code>@files = &lt;*&gt;;
  </code></pre>
  
  <p>If I need the files to be sorted, would the below be redundant?</p>
  
  <pre><code>@files = sort(&lt;*&gt;);
  </code></pre>