I'm fiddling with a super-tiny bit of code where just for obscurity's
sake, I feel like doing something tricky. A prog I've been working on
has suddenly grown the need for fractional cents in its money dealings,
*sometimes*. So: what I want is something to format money correctly,
whther it is fractional or not. there's the fairly awful:
sprintf ($amt =~ /\.\d\d\d/? "%7.3f": "%7.2f"), $amt
Not much better and a ton more dangerous [due to rounding]:
sprintf (int($amt/100) == $amt/100 ? ...etc
There *must* be some really sneaky/clever way to switch the format from
two placed to three places just when I need it....
/Bernie\
--
Bernie Cosell Fantasy Farm Fibers
mailto:[EMAIL PROTECTED] Pearisburg, VA
--> Too many people, too few sheep <--