Hi stuckdev,
As marto said, you need to have JSON installed. You could ask 2mhost to install it for you, or try to install it locally (if you have that capability). It's not a complete requirement, but JSON ("Javascript Object Notation") is a wonderful means of simplifying how data is serialized for passing between client and server.
As for your HTML page, if it's separate from your CGI, you can just put everything printed out by subroutine "print_html() into the html page, except for the "Content-type: text/html" (which will be printed for you automatically by the server, since it's in HTML.
You would then change $url in the function ajax_text(), in this line:
url: "$url",
to be whatever the name of your actual CGI/Perl script was instead.
However, please note that you will still need the headers printed from your server-side Perl/CGI script; eg.:
print "Content-type: application/json\n\n";
If you forget that, you'll get something like this error (from my /var/log/httpd/error_log file):
[Wed Mar 13 11:41:37 2013] [error] [client 192.168.17.33] Premature en
+d of script headers: 1023196.cgi, referer: http://mymachine.com/10231
+96.cgi
Does that help you get further?
say
substr+lc crypt(qw $i3 SI$),4,5
|