in reply to Accessing javascript variable from perl
I think you are only declaring the function without calling it.
'function(){JSON.stringify(leg);}'
So better try
'(function(){return JSON.stringify(leg);})()
Or just skip the anonymous function
'JSON.stringify(leg)'
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
FootballPerl is like chess, only without the dice
And Corion is of course right, you need - contrary to Perl - an explicit return in side JS functions
added return to code
|
|---|