in reply to Rounding without int() or printf()
I don't know if there is a module for accountancy rounding; I ended up using
which is probably pretty fugly, but did the job.$toround =~ /\.(\d)/; if ($1 >= 5) { $toround+=.5 } $toround = int $toround;
Update
Duh, and it uses int(). Excuse my idiocy.
Dave
|
|---|