[quickie] Rounding up to next multiple
Paul Makepeace <[email protected]>
| Newsgroups | gmane.comp.lang.perl.fun |
|---|---|
| Message-ID | <[email protected]> |
This isn't really perl, but it might be mildly fun for a few seconds: $len += $page_size - $len % $page_size if $len % $page_size; Any way of doing this in a single arithmetic expression, without the if? Paul -- Paul Makepeace ....................................... http://paulm.com/ "What is the best way to get a job? The softness in your voice, the echo of your hair in the wind." -- http://paulm.com/toys/surrealism/