Categorized | Biocompute

perl:使用system函数

Posted on 22 五月 2009 by 柳城 ,阅读 2,774

system函数使用介绍

#!/usr/bin/perl -w
$stant=system("ls");
print "$stant\n";

$well=system "'date'";
print "three:$well\n-------------\n";

@hello=("echo","hello,world!");
system(@hello);

 

`` 也可以用的
一个简单的例子:

#!/usr/bin/perl -w
@a=`ls /root` ;
foreach ( @a ) {
print $_ ;
}

 

直接输出

print `ls /root`;

转载请注明 : 来源于 perl:使用system函数 | 柳城

赞助商

Leave a Reply

广告招租

[强] [握手] [可爱] [ok] [呲牙] :) [偷笑] [流泪] [疑问] [亲亲] [擦汗] [得意] [衰] [可怜] [抱拳] [坏笑] more »

无觅相关文章插件,快速提升流量