http://qs321.pair.com?node_id=11135504

davidfilmer has asked for the wisdom of the Perl Monks concerning the following question:

Hello Masters! I am trying to liberate a Java program into Perl. It does a bunch of weird bitwise operations which I'm not very familiar with, but it seems the "<<"operator (left-shift) does not appear to be acting the same way. I have this bit of Java code, which is known to work as-expected:
public class hashTest { public static void main(String[] args) { long HIGH_BITS = 0xFFFFFFFF << 28; System.out.print( HIGH_BITS ); } }
RESULT: -268435456


In Perl, I rendered it like this:
#!/usr/bin/perl my $HIGH_BITS = 0xFFFFFFFF << 28; print( $HIGH_BITS );
RESULT: 4026531840



Can anyone see any reason why my Perl would not produce equivalent results as the Java code?

Thanks!