标签:return linux mod lin handle dem name mode amp
linux中,如果文件名中带括号,应先对括号处理,在“(”和“)”前加上“\”。Bracket_Handle给出了处理方法:
sub Bracket_Handle {
my ($tmp_name) = @_;
$tmp_name =~ s/\(/\\\(/g; # ( => \(
$tmp_name =~ s/\)/\\\)/g; # ) => \)
return $tmp_name;
}
如调用方法:
my $modem_make_file_name = &Bracket_Handle("$modem_make_file");
标签:return linux mod lin handle dem name mode amp
原文地址:http://www.cnblogs.com/quant-lee/p/6658755.html