in reply to Re^2: Trying to translate overflowing JS code to Perl
in thread Trying to translate overflowing JS code to Perl

I probably now have to implement all other arithmetic operators used in that JS code as above.

I can't come up with a better solution ... but if you were to use a perl whose ivsize was 4, then I think (not rigorously tested) you could take care of it with a simple use integer; at the top of the script.
On perl-5.38.0, built with just that configuration:
D:\>perl -V:ivsize ivsize='4'; D:\>perl -le "print 1169367104<<5;" 3060008960 D:\>perl -Minteger -le "print 1169367104<<5;" -1234958336
Cheers,
Rob