It seems that the Javascript is doing 32-bit signed math. So the easiest way is to do your calculations and then pack it into 32bit as 4 bytes, and then to reinterpret these four bytes as signed integer:
perl -E 'say unpack "l", pack "L", (1169367104<<5)' -1234958336
In reply to Re: Trying to translate overflowing JS code to Perl
by Corion
in thread Trying to translate overflowing JS code to Perl
by bliako
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |