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
In reply to Re: Re: Preferred Methods
by theorbtwo
in thread Preferred Methods
by vek
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |