Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: copying perl array to javascript array

by gryphon (Abbot)
on Aug 02, 2005 at 01:08 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://480054]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (3)
As of 2024-03-29 07:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found