我正在编写一个Perl脚本,允许我更改终端选项卡的磁贴,但是,每次运行它时,都会在我的终端线上打印“-n -e”.如果我保留这些选项,只需打印一个空白行.有没有什么方法可以在perl中执行系统命令,而且我的终端上没有显示任何代码残留?
1 #!/usr/bin/perl 2 #sets the title on terminal tabs (mac OSX) 3 4 #use strict; 5 use warnings; 6 7 #sets title of term window to input from user. 8 my $textline="\'echo -n -e \"\\033]0;"; 9 $textline = $textline . "@ARGV" . '\007"\''; 10 11 system "\'$textline\'"; 12
谢谢