No such thing as a small change | |
PerlMonks |
Providing perl array data to javascript codeby nikmit (Sexton) |
on Nov 19, 2015 at 09:40 UTC ( [id://1148103]=perlquestion: print w/replies, xml ) | Need Help?? |
nikmit has asked for the wisdom of the Perl Monks concerning the following question: Hi guys, I need to provide a perl array of about 400 elements to javascript code in an html page. I am already using (and learning) Template Toolkit to separate perl from html. My options as I currently see them: a) print out the array along with the rest of the js code in the header of the page b) some suggest JSON should be used for this, I would need to read-up c) look for a built-in function within Template Toolkit that already does that d) ...? I am looking for a balance of code efficiency/speed and ease of use - I'm not a dedicated web developer and don't want to spend weeks learning a language for a small increase in speed... then again if my current knowledge is archaic I don't want to sit in the stone age :)
Back to
Seekers of Perl Wisdom
|
|