Perl: the Markov chain saw | |
PerlMonks |
Array to list with quoted itemsby miguelele (Beadle) |
on Jan 15, 2012 at 19:09 UTC ( [id://948011]=perlquestion: print w/replies, xml ) | Need Help?? |
miguelele has asked for the wisdom of the Perl Monks concerning the following question: Hi, I need to pass a perl array, converted to a string list, to a block of JavaScript in a TT Template, to create a JavaScript array If I use $string_to_feed_javascript = join (", ", @perl_array);$string_to_feed_javascript contains all items separated by commas, but this breaks JavaScript syntax because each alphanumeric value must be enclosed by quotes./p> So How can I convert the array to a string this way?
Back to
Seekers of Perl Wisdom
|
|