I find the behaviour of int() odd: I want it to be like floor(), since then I can easily make ceil() and other useful functions for myself without loading the expensive POSIX module:
I've never been able to see a good reason for the existing "truncate towards zero" behaviour.sub ceil { -int(-shift) }
Hugo
In reply to Re: Perl oddities
by hv
in thread Perl oddities
by brian_d_foy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |