Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
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;

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://480054]
help
Chatterbox?
[choroba]: Anyone from the East coast to say Good night?
[Discipulus]: still off place choroba?
[choroba]: till the end of the week

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (7)
As of 2017-02-27 07:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?






    Results (376 votes). Check out past polls.