perl下取得操作系统的变量信息
时间:2009-05-23 来源:huifeideluotuo
有时候我们写perl脚本的时候,需要取得OS的一些信息,下面做个笔记。
#!/usr/bin/perl
use strict;
use warnings;
use Config;
print "the OS is $Config{osname}\n";
print "the OS kernel is $Config{osvers}\n";
print "the OS plate is $Config{archname}\n";
#!/usr/bin/perl
use strict;
use warnings;
use Config;
print "the OS is $Config{osname}\n";
print "the OS kernel is $Config{osvers}\n";
print "the OS plate is $Config{archname}\n";
相关阅读 更多 +
排行榜 更多 +