Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Difference between Perl and Java for << operator?

by Marshall (Canon)
on Jul 29, 2021 at 23:26 UTC ( [id://11135508]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use strict;
    use warnings;
    ...
    printf "%X\n", $HIGH_BITS;
    # prints: FFFFFFFF0000000
    # each hex digit is 4 bits, 7 zeroes x4 = 28 bits left shifted
    
  2. or download this
    >perl -le "my $HIGH_BITS = unpack "l", pack "l", 0xFFFFFFFF << 28; pri
    +nt $HIGH_BITS; "
    -268435456
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11135508]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (6)
As of 2024-04-25 08:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found