print pack('N', -1) eq pack('N', 0xffffffff) ? 'Same' : 'Different';; Same