我如何格式化这个例子:
100000为1000.00
和
90为0.90
用Perl?
我发现,用像一些模块尝试Locale::Currency::Format和Number::Format,但没有工作:/
随着Locale::Currency::Format我尝试:
use Locale::Currency::Format;
my $total = 19750;
my $convert = currency_format('USD',$total,'FMT_COMMON');
print $convert;
Run Code Online (Sandbox Code Playgroud)
我预计197.50但是印刷品是"19,750.00美元".