in reply to emulate 32-bit on perl 64
How can I force it to work correct on perl based 64 ?
It gets very messy.
Effectively you have to mask the resultant from operation after any operation that might cause the resultant to be promoted to more than 32 bits. eg.
C:\test>\perl32\bin\perl -le"print 11 | 29 | ~15" 4294967295 C:\test>\perl64\bin\perl -le"print 11 | 29 | ~15" 18446744073709551615 C:\test>\perl64\bin\perl -le"print 11 | 29 | ( ~15 & 0xffffffff )" 4294967295
And if you are manipulating signed rather than unsigned values it gets really tiresome.
I don't know of a good solution to this problem.