malformed JSON string, neither tag, array, object, number, string or atom, at character offset 0 (before "Can't connect to ip...") #### my $req = HTTP::Request->new(POST => 'http://ip:4000'); $req->content_type('application/x-www-form-urlencoded'); $req->content_type('application/json'); my $res = $ua->request($req); $respons = JSON::XS->new->decode ($res->content); $dat = $respons->{data}; $adat1 = $respons->{name};