Perl调用shell命令方法小结

1、system perl也能够用system调用shell的命令,它和awk的system同样,返回值也是它调用的命令的退出状态. shell 复制代码 代码以下: [root@AX3sp2 ~]# cat aa.pl #! /usr/bin/perl -w $file = "wt.pl"; system("ls -l wt.pl"); $result = system "ls -l $file
相关文章
相关标签/搜索