perl 字符串数组,如何输出带引号的数组元素

前端之家收集整理的这篇文章主要介绍了perl 字符串数组,如何输出带引号的数组元素前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

from: http://stackoverflow.com/questions/739214/how-do-i-output-each-perl-array-element-surrounded-in-quotes

例如:

/home/a/j/nomad2:cat 1
#!/usr/bin/perl

my @strArray = ("abc","bcd");
my $text = do { local {1}quot; = q<",">; qq<"@strArray"> };

print "$text\n";
/home/a/j/nomad2:./1
"abc","bcd"

猜你在找的Perl相关文章