I want to pass an array created dynamically in Perl to a JavaScript function. I do not want to pass it element by element. How do
I process it in the JavaScript function?
my @perlArray;
<input type='button' onClick=call_me(perlArray) >
JavaScript:
function call_me(PassedArray){
#process the array
}
Use
JSON::XSto serialize array and just print resulting string between brackets of JS function call, escaping it for HTML with any suitable module (likeHTML::Entities).