in reply to
Re: zero fill with pack
in thread
zero fill with pack
$n & 0xffffffff
won't work. You need
$n % 0xffffffff
.
Comment on
Re^2: zero fill with pack
Select
or
Download
Code
Replies are listed 'Best First'.
Re^3: zero fill with pack
by
BrowserUk
(Patriarch)
on Jun 22, 2010 at 16:53 UTC
Works for my (64-bit) Perl ;)
[reply]
Re^4: zero fill with pack
by
ikegami
(Patriarch)
on Jun 22, 2010 at 17:10 UTC
Yes, but that code was specifically written for "a Perl that doesn't support 64-bit ints (Q)." The bitwise ops (i.e. "
&
") currently require native integer arguments, and those can be at most
0xFFFFFFFF
in such a Perl.
[reply]
[d/l]
[select]
In Section
Seekers of Perl Wisdom