use Locale::Formatmoney;
print format_money(-123456789.123457, 'fr', 'frf'), "\n";
Format an amount of money and return the result in a string. Two hash arrays are used to configure the output (%monetary_presentation and %monetary_specific).
format_money amount language money [ long_name ]
The result is a string following the local convention, for exemple: format_money(123456789.123457, 'fr', 'frf', 0)="123 456 789,12 FRF"
a reel number
the country of the reader (fr or en), see %monetary_presentation to extend the choice.
the money of the amount (frf ou eur), see %monetary_specific to extend the choice.
do we print the money with the long name (1) or with the abreviation (0), default is 0
print format_money(-123456789.123457, 'fr', 'frf');
will print "-123 456 789,12 FRF".
There are plenty other bugs and at least one with terrible concequances for you, you have been warned.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See either the GNU General Public License for more details.