perlquestion
cr8josh
<p>Sort::Key::Natural seems to have different results based on capitalization. First letter uppercase sorts differently than both all upper and all lower case</p>
<code>
use feature qw( say );
use Sort::Key::Natural qw( natsort );
say for natsort qw( P007b_Yum P007_Yum );
say qw(---);
say for natsort qw( P007B_YUM P007_YUM );
say qw(---);
say for natsort qw( P007b_yum P007_yum );
</code>
<p>Output:</p>
<code>
P007_Yum
P007b_Yum
---
P007B_YUM
P007_YUM
---
P007b_yum
P007_yum
</code>
<p>In the first case (uppercase first), the "P007b_" sorts after "P007_". In the other cases (all upper or all lower), it sorts after. As a result, I can't do case-insensitive sorting without changing the results. Can any monks help?
</p>
<p>Thanks!</p>