Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Natural Sort / Windows sort problem

by ikegami (Patriarch)
on Oct 30, 2017 at 17:31 UTC ( [id://1202348]=note: print w/replies, xml ) Need Help??


in reply to Natural Sort / Windows sort problem

You are mistaken. While neither guarantee the order of Windows Explorer, they do not produce the order you claim they do.

$ perl -e' use feature qw( say ); use Sort::Naturally qw( nsort ); say for nsort qw( HC_TalkRoar_1 HC_TalkRoar_1b ); ' HC_TalkRoar_1 HC_TalkRoar_1b
$ perl -e' use feature qw( say ); use Sort::Key::Natural qw( natsort ); say for natsort qw( HC_TalkRoar_1 HC_TalkRoar_1b ); ' HC_TalkRoar_1 HC_TalkRoar_1b

Replies are listed 'Best First'.
Re^2: Natural Sort / Windows sort problem
by cr8josh (Sexton) on Oct 30, 2017 at 17:40 UTC
    Thank you, you helped me find the issue which was not the sorting. Much appreciated! The issue was because of my file extensions. If you add .wav to the end of those two strings, they sort backwards. Filtering out the file extensions solves it.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1202348]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (3)
As of 2024-03-29 14:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found