如何检查我的Perl安装是32位还是64位? [英] How can I check whether my Perl installation is 32 or 64 bit?
问题描述
在Windows上,如何检查我的Perl安装是32位还是64位?
On Windows, how can I check whether my Perl installation is 32 or 64 bit?
推荐答案
如果要检查它是使用32位整数还是64位整数,请使用以下命令:
If you want to check if it uses 32-bit integers or 64-bit integers, use the following:
perl -V:ivsize # use Config; say $Config{ivsize}
- 如果返回值为4,则您的Perl使用32位整数.
- 如果返回值为8,则您的Perl使用64位整数.
如果要检查它是使用32位指针还是使用64位指针,请使用以下命令:
If you want to check if it uses 32-bit pointers or 64-bit pointers, use the following:
perl -V:ptrsize # use Config; say $Config{ptrsize}
- 如果返回值为4,则您的Perl可以寻址4 GB的RAM.
- 如果返回值为8,则您的Perl可以寻址无限"的RAM.
如果要检查它是32位程序还是64位程序,请使用以下命令:
If you want to check if it's a 32-bit program or a 64-bit program, use the following:
perl -V:archname # use Config; say $Config{archname}
- 如果返回的值包括
x86_64
,则它是一个64位进程. - 如果返回的值包括
x86
(但不包括x86_64
),则它是一个32位进程. - If the returned value includes
x86_64
, it's a 64-bit process. - If the returned value includes
x86
(but notx86_64
), it's a 32-bit process.
此值也包含在perl -v
的输出中.
This value is also included in the output of perl -v
.
注意:您不应该检查use64bitint
或use64bitall
,因为它们指示将什么参数传递给Configure
,而不是提供有关实际使用的信息.
Note: You shouldn't be checking use64bitint
or use64bitall
as these indicate what parameters were passed to Configure
rather than provide information about what was actually used.
这篇关于如何检查我的Perl安装是32位还是64位?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!