in reply to stripping "." from amounts
If your values are always going to have ".00" to the right of the decimal point, you could use a regex on the stringified version of $number:
optionally replacing the second 0 with a plus sign or even an asterisk, depending on how many zeros you expect.$number =~ s/\.00$//;
Of course, I wouldn't do it that way; I'd use sprintf to round the value to an integer, because I'd want to avoid having 89.99999 slip through.
|
|---|