Beefy Boxes and Bandwidth Generously Provided by pair Networks DiBona
Don't ask to ask, just ask
 
PerlMonks  

Re: copying perl array to javascript array

by gryphon (Abbot)
on Aug 02, 2005 at 01:08 UTC ( #480054=note: print w/ replies, xml ) Need Help??


in reply to copying perl array to javascript array

Greetings Rainmaker,

I don't have any experience with SAJAX, but I've had significant (and quick and easy) success with JSON. There's a CPAN module for it, and it's crazy-simple/easy.

use JSON; print "Content-Type: text/html\n\n", objToJson('list' => [ 'a', 'b' ]) +;

Obviously, this is very simple, but complex structures are a piece of cake.

gryphon
Whitepages.com Development Manager (DSMS)
code('Perl') || die;


Comment on Re: copying perl array to javascript array
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://480054]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (4)
As of 2014-04-21 01:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (489 votes), past polls