![]() |
|
Pathologically Eclectic Rubbish Lister | |
PerlMonks |
Re: porting C code to Perlby Mr. Muskrat (Canon) |
on Oct 23, 2017 at 16:53 UTC ( #1201910=note: print w/replies, xml ) | Need Help?? |
haukex and syphilis have already provided some good answers but I thought that I would point out some things that I didn't see mentioned. Perl's int is not the same as C's floor(). What you want is POSIX::floor. It has the identical behavior as C's floor(). Perl has a pre-decrement just like C.
YMMV as I haven't tried it out with these changes implemented.
In Section
Seekers of Perl Wisdom
|
|