sti*_*vlo 0 linux windows perl
如何在Perl中获取当前计算机主机名?我正在寻找一种适用于Linux和Windows的方法.
使用websearch我找到了模块Sys :: Hostname,但我无法安装它
install Sys::Hostname
Going to read '/home/stivlo/.cpan/Metadata'
Database was generated on Sat, 04 Jun 2011 15:27:16 GMT
Running install for module 'Sys::Hostname'
The most recent version "1.16" of the module "Sys::Hostname"
is part of the perl-5.13.11 distribution. To install that, you need to run
force install Sys::Hostname --or--
install F/FL/FLORA/perl-5.13.11.tar.gz
Running make test
Can't test without successful make
Running make install
Make had returned bad status, install seems impossible
Failed during this command:
FLORA/perl-5.13.11.tar.gz : make NO isa perl
Run Code Online (Sandbox Code Playgroud)
我在这个测试的Perl版本在Linux Ubuntu上是5.10.1,我将在Windows上使用Strawberry Perl.
| 归档时间: |
|
| 查看次数: |
1714 次 |
| 最近记录: |