Mercurial > boosterpack
annotate scripts/pjx_JSON_out.pl @ 0:477258d09353 boosterpack
[svn r1] initial import
author | robert |
---|---|
date | Sun, 30 Aug 2009 02:19:26 -0400 |
parents | |
children |
rev | line source |
---|---|
robert@0 | 1 #!C:/strawberry/perl/bin/perl.exe |
robert@0 | 2 use strict; |
robert@0 | 3 use CGI; |
robert@0 | 4 use JSON; |
robert@0 | 5 use Data::Dumper; |
robert@0 | 6 |
robert@0 | 7 my $q = new CGI; |
robert@0 | 8 |
robert@0 | 9 |
robert@0 | 10 print $q->header(); |
robert@0 | 11 |
robert@0 | 12 |
robert@0 | 13 my $val = $q->param('args'); |
robert@0 | 14 my @vals = split(//, $val); |
robert@0 | 15 |
robert@0 | 16 |
robert@0 | 17 my $hash; |
robert@0 | 18 map { $hash->{$_} = chr(ord($_)+1) } @vals; |
robert@0 | 19 |
robert@0 | 20 my $json = objToJson($hash); |
robert@0 | 21 |
robert@0 | 22 print "var jsonObj = $json"; |