in reply to Perl evals and JSON
Also, you probably want
my @keys = keys %urlparams; # ~~~~
Otherwise, you're processing values, too.
Moreover, you probably want
otherwise there's nothing to store.$input{$key} = HTML::Entities::encode($urlparams{$key}); # ~~~~~~~~~
Can you share a snippet that actually reproduces your problem? I tried to fix you sample and ran it under JSON::PP, JSON::XS, and Cpanel::JSON::XS, but there were no errors.
|
|---|