in reply to Re: Difference in sort order between Solaris and Linux
in thread Difference in sort order between Solaris and Linux

Hi,

To your point "...If I remove &use locale& from the Perl code, I can see sort behaving differently...". Have you tried to call your script on both environments this way:

LANG=C perl sortscript.pl

What is the outcome in this case?

McA

Replies are listed 'Best First'.
Re^3: Difference in sort order between Solaris and Linux
by lpwevers (Acolyte) on Mar 05, 2014 at 14:01 UTC
    Hi, Ok, just tried that. There's no difference in the outcome. To make sure I also double checked that the locale settings in the shell are set to the right iso8859 value.

      Now it would be interesting to see whether the commandline sort behaves similar. Put the words in a file per line and do a LANG=C sort file on both machines.

      McA

        Hi,

        Interesting test indeed. The result is exactly the same as it is when using Perl. So I expect one of the two OS-es not playing nicely with the standards.