in reply to Re: Difference between Perl and Java for << operator?
in thread Difference between Perl and Java for << operator?

Note also, that your << 28 assumes that your perl is compiled for 32-bit integers

Well spotted - if you want to use the perl sub that the OP provided then:
1) you will need to be running under the use integer pragma;
and
2) you will also need to be running a perl that was built with 32-bit integers.

However, as has also been demonstrated, there are ways to obtain the desired result by doing a 0xFFFFFFFF << 28, that will work on both 32-bit integer and 64-bit integer builds.

Cheers,
Rob