http://www.perlmonks.org?node_id=997835


in reply to Re: How to tell 32 or 64 bit
in thread How to tell 32 or 64 bit

length(pack('J',0))
in the past I used that, but then I realized that 64 bit IVs but 32 bit pointers and machine code Perls existed, so it is wrong. Another good way to telling is
perl -MConfig -e "print $Config{ptrsize}"
which will return 4 or 8, and is NOT the IV size