简体   繁体   English

如何在 Perl 中使用基于区域设置的小数分隔符格式化数字?

[英]How to format numbers with locale based decimal separator in Perl?

I seek for way to use locale-based decimal separator in my perl-scripts.我寻求在我的 perl 脚本中使用基于语言环境的小数分隔符的方法。 For now i don't see better solution than just s/\./,/ in specific places, but it is ugly and i'd like to have more clean solution.现在我没有看到比在特定地方s/\./,/更好的解决方案,但它很难看,我想要更干净的解决方案。

The perllocale manpage might be useful. perllocale 联机帮助页可能很有用。 It also has examples.它也有例子。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM