in reply to Odd behavior of $#
I think you're coming up against a bit of perl DWIMery, that it decides a string "looks like a number" if it has only whitespace around the number. You can work around it by not doing that (eg by having "\n$amount -"), but you are best off just using printf and avoiding the (deprecated) $# variable:
Hugoprintf "\n%s - %2f = %.2f", $amount, $taxes, $amount - $taxes;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Odd behavior of $#
by JamesNC (Chaplain) on Feb 19, 2003 at 19:34 UTC |