I can't spot the exact problem but I suspect a floating point problem. I suggest you follow the advice from perldoc int and use the POSIX::floor instead:
From the docs:
...For example, int(-6.725/0.025) produces -268 rather than the correct -269; that's because it's really more like -268.99999999999994315658 instead. Usually, the sprintf, printf, or the POSIX::floor and POSIX::ceil functions will serve you better than will int.In reply to Re: Windows / Linux puzzler
by Veltro
in thread Windows / Linux puzzler
by lbrandewie
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |