localeconv#

Numeric and monetary formatting rules for the active locale.

Σύνοψη#

use POSIX qw(localeconv);
my $lc = localeconv();
print "Decimal: $lc->{decimal_point}\n";

Τι επιστρέφεται#

A hashref whose keys are the struct lconv field names - decimal_point, thousands_sep, grouping, int_curr_symbol, currency_symbol, mon_decimal_point, mon_thousands_sep, mon_grouping, positive_sign, negative_sign, and the monetary char fields (int_frac_digits, frac_digits, p_cs_precedes, p_sep_by_space, n_cs_precedes, n_sep_by_space, p_sign_posn, n_sign_posn).

Οριακές περιπτώσεις#

  • Char fields equal to CHAR_MAX mean «not available in this locale»; all numeric char fields are returned unconditionally.

  • Returns undef if libc localeconv() fails (rare).

Διαφορές από το upstream#

Fully compatible with upstream POSIX.

Δείτε επίσης#

  • setlocale - pick which locale those rules come from.