Just another Perl shrine | |
PerlMonks |
Re: rounding to nearestby rob_au (Abbot) |
on Mar 22, 2003 at 09:21 UTC ( [id://245114]=note: print w/replies, xml ) | Need Help?? |
How about the following?
The round subroutine takes two parameters, the number to be rounded and the nearest value to which you want it to be rounded to.
perl -le 'print+unpack("N",pack("B32","00000000000000000000001001000001"))'
In Section
Seekers of Perl Wisdom
|
|