"be consistent" | |
PerlMonks |
Re: Sorting (GRT) and locale issuesby chrism01 (Friar) |
on Nov 15, 2007 at 05:11 UTC ( [id://650919]=note: print w/replies, xml ) | Need Help?? |
Now I'm confused. According to BrowserUK: That way is to use pack to convert the numeric fields into binary values that will sort correctly using a string comparison function. It is convenient that binary encode integers (NOTE:In 'network' format only. That is 'N'&'n' *NOT* 'V'&'v') will sort correctly using a string comparison function.
Are you saying that although I always use locale; to ensure a prog behaves correctly in the local locale (eg sorting), there's something special about GRT that means I have to turn it off? Incidentally, his results are sorted by num, then letter. Chris
In Section
Seekers of Perl Wisdom
|
|