in reply to Re: Preferred Methods
in thread Preferred Methods
I like your round() function, though I'd have it take a "nearest x" parameter instead of a "number of digits" parameter. Just replace the ||=0 with ||=1 and 10**$p with $p. Then you can say round($inches, 1/8), or round($bagles, 12).
Thanks,
James Mastros,
Just Another Perl Scribe
|
|---|