in reply to copying perl array to javascript array
Data::Javascript
That's good, but I prefer the output of Data::JavaScript::Anon, which uses JavaScript's array construction syntax and avoids messily repeating the variable name for every element.
Smylers