http://qs321.pair.com?node_id=852565


in reply to Re^3: Change decimal point temporarily
in thread Change decimal point temporarily

The motivation is a feature for the module described in RFC: Text::CSV::R. It is an option to set the decimal point. In Germany for example, it is common for CSV files to use a comma as decimal point and a semicolon as field separator.

So I guess a locale approach would be the performance-wise fastest solution. But setting the locale to an arbitrary locale which uses a comma (de_DE, fr_Fr,...) just to change this single parameter seems like hack.

Replies are listed 'Best First'.
Re^5: Change decimal point temporarily
by jeffa (Bishop) on Aug 02, 2010 at 23:30 UTC

    I consider using a comma instead of a decimal like that to be a hack in and of itself ... so, when in Rome. ;)

    jeffa

    L-LL-L--L-LL-L--L-LL-L--
    -R--R-RR-R--R-RR-R--R-RR
    B--B--B--B--B--B--B--B--
    H---H---H---H---H---H---
    (the triplet paradiddle with high-hat)