in reply to Difference between Perl and Java for << operator?
The answer to your question is hidden in the documentation for Integer Arithmetic. You need use integer; if you want your result as a signed integer. (By default it is treated as an unsigned integer.) Note also, that your << 28 assumes that your perl is compiled for 32-bit integers.
Bill
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Difference between Perl and Java for << operator?
by syphilis (Archbishop) on Jul 31, 2021 at 10:25 UTC | |
Re^2: Difference between Perl and Java for << operator?
by eyepopslikeamosquito (Archbishop) on Jul 31, 2021 at 07:33 UTC |
In Section
Seekers of Perl Wisdom