Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re^2: Difference in sort order between Solaris and Linux

by McA (Priest)
on Mar 05, 2014 at 13:44 UTC ( [id://1077082]=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (5)
As of 2024-04-24 03:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found