Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

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 Development Manager (DSMS)
code('Perl') || die;

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

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (5)
As of 2015-11-29 04:05 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (746 votes), past polls