Thank you!
I found something I don't understand, which is forcing me to use the Win32 call method described above. When trying to do a case-insensitive sort by using {uc $_} or {lc $_}, I get different and unexpected results. Here is an example using the same string sets, one upper case, one not.
use feature qw( say ); use Sort::Key::Natural qw( natsort ); say for natsort qw( P007B_YUMYUMNOISESANDTASTING1 P007_YUMYUMNO +ISESANDTASTING5A P007_YUMYUMNOISESANDTASTING5B 007_YUMYUMNOISESANDTAS +TING5C ); say for natsort qw( P007b_YumYumNoisesAndTasting1 P007_YumYumNoises +AndTasting5A P007_YumYumNoisesAndTasting5B P007_YumYumNoisesAndTastin +g5C );
Output:
P007B_YUMYUMNOISESANDTASTING1 P007_YUMYUMNOISESANDTASTING5A P007_YUMYUMNOISESANDTASTING5B P007_YUMYUMNOISESANDTASTING5C P007_YumYumNoisesAndTasting5A P007_YumYumNoisesAndTasting5B P007_YumYumNoisesAndTasting5C P007b_YumYumNoisesAndTasting1
In the first case, the "P007B_" sorts before "P007_". In the second case it sorts after. If I do all lc, it's the same thing, 7b sorts to the beginning instead of the end:
P007b_yumyumnoisesandtasting1 P007_yumyumnoisesandtasting5a P007_yumyumnoisesandtasting5b P007_yumyumnoisesandtasting5c
Anyone understand why? I need it to sort after, but be case insensitive...
Thanks!
In reply to Re^2: Natural Sort / Windows sort problem
by cr8josh
in thread Natural Sort / Windows sort problem
by cr8josh
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |