TEST.PL #!/usr/bin/perl -w print "Content-type: text/html\n\n"; print < Untitled Document
Fullname:

Name Is:

END_HTML #### TE.PL #!/usr/bin/perl -w use JSON; use CGI; my $q = new CGI; my $name = $q->param("fname"); my $json = encode_json( { msg => $name } ); print $q->header( -type => 'application/json' ),$json;