in reply to pl script in webserver

Most likely you are right and your web host does not provide JSON::XS. If so, you can try using JSON::PP instead. If your Perl is v5.14 or newer, JSON::PP is in the core distribution. If your Perl is older than that you can simply copy the source code to some place in your home directory and load it from there.

If you don't know how to find out what version of Perl you are using, do some searches, it's easy enough.

Hope this helps!


The way forward always starts with a minimal test.

Replies are listed 'Best First'.
Re^2: pl script in webserver
by bigup401 (Pilgrim) on Apr 09, 2017 at 00:49 UTC

    both modules are installed, but what i have discovered.

    when its like this it cause the problem am facing

    my $ua = LWP::UserAgent->new( ssl_opts => { verify_hostname => 0 }, );

    but when its like this

    my $ua = new LWP::UserAgent(keep_alive=>1);

    i get this malformed JSON string, neither tag, array, object, number, string or atom, at character offset 0 (before "<html>\r\n<head><tit...")

    same when its like this LWP::UserAgent->new;