in reply to Re: Re: Odd behavior of $#
in thread Odd behavior of $#

Is there a way to tell sprintf to add a dollar sign?
Sure, just: my $net = sprintf '$ %.2f', $amount - $taxes;You can put whatever you like in the format string.

For more complicated things, you can try Number::Format. It's a little heavyweight for my taste, but it works.