Re: Perl with Ajax issue

2019-08-13 Thread David Dorward

On 12 Aug 2019, at 19:45, Matt Zand wrote:


use CGI;


Do read [CGI: CGI.pm has been removed from the Perl core][1]

Should I install Perl on the server or does it come with Apache 
package.


Apache HTTPD does not include a Perl distribution although some 
third-party bundles include both Perl and Apache HTTPD.


You would also need to configure Apache so it will run the Perl program 
through the perl runtime.



I am getting no response.


If you are getting no response at all, then your problem is unlikely to 
be related to a lack of Perl. That would cause it to return an error 
response.



[1]: 
https://metacpan.org/pod/distribution/CGI/lib/CGI.pod#CGI.pm-HAS-BEEN-REMOVED-FROM-THE-PERL-CORE

Perl with Ajax issue

2019-08-12 Thread Matt Zand
I am making Ajax call to Perl page and try to parse data in perl page and
return results to html page
on my perl page, I have

use strict;
use warnings;
//
use JSON;
use CGI;

my $cgi = CGI->new();
my $string = $cgi->param('sform');
my $json = encode_json( [$string] );
print $cgi->header( -type => 'application/json' );
print $json;
print $string;

I am tesitng this on localhost.

I am getting no response. Should I install Perl on the server or does it
come with Apache package.



-- 
Cheers,

Matt Zand
Cell: 202-420-9192
Work: 240-200-6131
High School Technology Services 
DC Web Makers 
Coding Bootcamps