【发布时间】:2012-05-22 16:31:03
【问题描述】:
当我以这种方式将参数传递给system 时,使用String::ShellQuote 中的shell_qoute 是否有意义?
#!/usr/bin/env perl
use warnings;
use 5.012;
use String::ShellQuote qw(shell_quote);
my $file = shift;
my $argument = shift;
$file = shell_quote $file;
$argument = shell_quote $argument;
system( 'some_command', '--verbose', '-o', $file, $argument );
【问题讨论】:
标签: perl shell system argument-passing