Re: sort

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Joseph A Nagy Jr wrote:

I know for a fact that Perl's sort is in pure ASCIIbetical order, not

sure what it depends on, though. If the original poster would like a script created, I might be able to oblige him (not sure on a few functions, but that isn't a HUGE problem, just might take me a while)


Yes, but, in perlfunc:

When "use locale" is in effect, "sort LIST" sorts LIST accord-
ing to the current collation locale. See perllocale.


If the locale's collation sequence bothers you like it does me just put

export LC_COLLATE=C

in your .bash_profile like I do. You don't need to jump through hoops. Or use perl :-) Incidentally, collation is done by converting from UTF-8 to UCS-2 (roughly speaking) and then using a language-specific collation order. It's very slow. 0.25s for the dictionary vs 0.06s for the same dictionary with LC_COLLATE=C. That's the main reason you'll see LANG=C cmd ... all over the place in the initscripts.

jch






[Index of Archives]     [Fedora Users]     [Centos Users]     [Kernel Development]     [Red Hat Install]     [Red Hat Watch]     [Red Hat Development]     [Red Hat Phoebe Beta]     [Yosemite Forum]     [Fedora Discussion]     [Gimp]     [Stuff]     [Yosemite News]

  Powered by Linux