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 字符串数组,如何输出带引号的数组元素)