Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^2: weird problem with macports perl on apple m1/m2 based system

by perltux (Monk)
on Jun 12, 2023 at 12:35 UTC ( [id://11152807] : note . print w/replies, xml ) Need Help??


in reply to Re: weird problem with macports perl on apple m1/m2 based system
in thread weird problem with macports perl on apple m1/m2 based system

AFAIK, based on Tests on my Linux PC, to get LC_NUMERIC to influence the output of sprintf requires adding 'use locale;' (in addition to 'use POSIX;' or 'use POSIX qw(locale_h);') in the script.

On my Linux PC I actually have a locale (de_DE) that uses comma as decimal point and dot as thousands separator and despite that it has no influence on the calculations in the test program or the original application.

But since 'use POSIX;' also includes 'use POSIX qw(locale_h);' I have now modified my test script to use 'use POSIX qw(strftime);' instead of 'use POSIX;' and asked the Mac M1 user to download and run the test script again and based on his feedback it's still ignoring decimals in the multiplication, the output is still:
12.99 16.25 192
  • Comment on Re^2: weird problem with macports perl on apple m1/m2 based system
  • Download Code

Replies are listed 'Best First'.
Re^3: weird problem with macports perl on apple m1/m2 based system
by karlgoethebier (Abbot) on Jun 12, 2023 at 14:49 UTC

    That would have been too nice if it had been this problem. Too bad. Good luck with the further research.

    «The Crux of the Biscuit is the Apostrophe»