diff 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
line wrap: on
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/scripts/pjx_JSON_out.pl	Sun Aug 30 02:19:26 2009 -0400
     1.3 @@ -0,0 +1,22 @@
     1.4 +#!C:/strawberry/perl/bin/perl.exe
     1.5 +use strict;
     1.6 +use CGI; 
     1.7 +use JSON;
     1.8 +use Data::Dumper;
     1.9 +
    1.10 +my $q = new CGI;
    1.11 +
    1.12 +
    1.13 +print $q->header(); 
    1.14 +
    1.15 +
    1.16 +my $val = $q->param('args');
    1.17 +my @vals = split(//, $val);
    1.18 +
    1.19 +
    1.20 +my $hash;
    1.21 +map { $hash->{$_} = chr(ord($_)+1) } @vals;
    1.22 +
    1.23 +my $json = objToJson($hash);
    1.24 +
    1.25 +print "var jsonObj = $json";