Re: Dividing in Perl

2007-03-20 Thread Chas Owens
On 3/20/07, Rob Dixon <[EMAIL PROTECTED]> wrote: snip You seem very indignant that Perl is offering you a floating-point result - it started giving 24.5 right at the beginning of its life! What are these languages you have used that give only an integer result for division? I can think of none of

Re: Dividing in Perl

2007-03-20 Thread Rob Dixon
Don Dukelow wrote: I have a script where I have to divide and all I want is the hole number, not the decimal point. When I do $num = 2; $count = 49; $count /= $num; $count comes out 24.5, I thought I would get 24. If I wanted the remainder I WOULD DO. $count %= $num; which does work. When d

Re: Dividing in Perl

2007-03-20 Thread Robin Sheat
On Wednesday 21 March 2007 00:34, Dukelow, Don wrote: > and this works.  But every other language I've programmed in anything > dividing with "/" you only get the hole number why? That's because you've only used languages that aren't a very good abstraction of the underlying machine. Many common l