in reply to Re^5: Using split, splice, and join to remove time from scalar context return of localtime()
in thread Using split, splice, and join to remove time from scalar context return of localtime()

For example, sort (and eq, ne et al.) will often not do what is expected by my algorithms (or yours), if the locale on the machines our code is run on is incompatible.

That's not true.

eq and ne are never affected by the locale.

As for lt, le, cmp (which includes the default sort), ge and gt, you need to use use locale; to make them observe the locale. That's why you normally don't have to worry about the user's locale.

  • Comment on Re^6: Using split, splice, and join to remove time from scalar context return of localtime()
  • Select or Download Code

Replies are listed 'Best First'.
Re^7: Using split, splice, and join to remove time from scalar context return of localtime()
by BrowserUk (Patriarch) on Dec 18, 2009 at 08:45 UTC
    That's why you normally don't have to worry about the user's locale.

    Ditto localtime.


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.