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

An out of the box 64 bit Perl will use 64 bit integer variables and would give the correct result in this case

An interesting aside is that, for the OP's purposes, perl's ivsize is irrelevant, and this can be demonstrated using jwkrahn's perceptive solution :

With 64-bit IVs:
>perl -V:ivsize ivsize='8'; >perl -le "print unpack 'l', pack 'l', 0xFFFFFFFF << 28;" -268435456
and with 32-bit IVs:
C:\>perl -V:ivsize ivsize='4'; C:\>perl -le "print unpack 'l', pack 'l', 0xFFFFFFFF << 28;" -268435456
Nor does $Config{longsize} make a difference - because the "l" template always specifies 32-bit.
I believe the "i" template could also be used.
According to the documentation, the "i" template could be specifying either 32-bit or 64-bit, depending upon $Config{intsize} - but I've never struck a perl where $Config{intsize} != 4.

Cheers,
Rob