in reply to perl subtraction
printf ("\$%2.2f\n", $val);
where $val is the value that you want to print. This will give you dollar sign, and value to two decimal places. Your first example comes back as $0.00, which is probably what you want. This might be a little easier to deal with than changing over to representing your figures in cents, if you've already written some code.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: perl subtraction
by Anonymous Monk on Jan 10, 2010 at 07:14 UTC | |
by ikegami (Patriarch) on Jan 10, 2010 at 08:56 UTC | |
by Anonymous Monk on Jan 10, 2010 at 08:28 UTC | |
by dsheroh (Monsignor) on Jan 10, 2010 at 11:25 UTC |