Hello,
I need to compare two variables that contain money amounts. I thought in using: if ($var1 > $var2) { ... } . In other words i need to comapre if $var1 is greater than $var2 is it is display something, if its not display an error.
But then i see that the variables actually contain amounts in this format:
When in thousands:
$64,000.00 or
$64,000 or
$64000.
When in hundreds:
$200.00 or
$200
Is there any way i can sucesfully compare so Perl understands this differ formats?
If not i can require the remote user only to use amounts in this form: $200 and $64,000 . I think itll be easier to compare, but still how do i do it? Tnx!