Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
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 perusing the Monastery: (12)
As of 2015-07-30 21:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (273 votes), past polls