in reply to How do I output each Perl array element sourrounded in quotes?
Which I think would work.Why think? Why not just try it?
(However, heed the comments of other monks concerning handling of empty strings, etc.)>perl -wMstrict -le "my @Array = ('A', 'B', 'C'); my $text = '\"' . join('\" \"', @Array) . '\"'; if ($text eq '\"\"') { $text = ''; } print $text; " "A" "B" "C"
|
|---|