[Reply to all]<br><br>$x = '$65,345.89zzzzzz';<br>if ($x =~ /\$([\d,.+-]+)/) { $y = $1 }<br><br>(Obviously you can be more sophisticated with the match.)<br>
<br>There's probably a FAQ for this, but I'm lazy today.<br><br><div class="gmail_quote">On Thu, Feb 5, 2009 at 10:29 AM, Ilia <span dir="ltr"><<a href="mailto:samogon@gmail.com">samogon@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">I can't believe there doesn't seem to be a CPAN module to parse a<br>
currency into a decimal.<br>
<br>
The function I'm looking for should return a decimal based on various<br>
input like:<br>
$65,345.89<br>
$65.345,89<br>
$24,969.00(txincl.)<br>
$24,969.00*<br>
<br>
any extraneous data like "(txincl.)" should be removed. any spaces<br>
should be removed.<br>
<br>
Any takers?<br>
<font color="#888888"><br>
ilia.<br>
_______________________________________________<br>
toronto-pm mailing list<br>
<a href="mailto:toronto-pm@pm.org">toronto-pm@pm.org</a><br>
<a href="http://mail.pm.org/mailman/listinfo/toronto-pm" target="_blank">http://mail.pm.org/mailman/listinfo/toronto-pm</a><br>
</font></blockquote></div><br><br clear="all"><br>-- <br>-QM<br>Quantum Mechanics: The dreams stuff is made of<br>