The first thing I'd do is to ensure your server script runs without problems, perhaps you don't have the JSON module installed, perl does not have JSON as part of it's core module set. Running the script from the command line will throw errors if a module is missing, apache will throw an error and your client won't be able to get a valid response. Various debugging techniques are covered in CGI Help Guide from CGI Programming.
Update: to install JSON from the command prompt:
Or speak to your systems administrator.