annotate scripts/pjx_JSON_out.pl @ 10:3b52ac950753 boosterpack tip

going to try to fix this thing
author Robert McIntyre <rlm@mit.edu>
date Mon, 27 Sep 2010 17:24:06 -0400
parents 477258d09353
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";