在 Perl 中,可以使用反引号 " "
或 qx//
运算符来执行Shell。
反引号 " "
代码如下
my $commandLine = "dir";
system($commandLine);
qx//
运算符
代码如下
my $output = `dir`;
print $output;
在 Perl 中,可以使用反引号 " "
或 qx//
运算符来执行Shell。
"
代码如下
my $commandLine = "dir";
system($commandLine);
qx//
运算符代码如下
my $output = `dir`;
print $output;