How to pass parameters for multisignature addresses from Perl to the JSON::RPC::Client?
The ["key,"key"] part of the documentation means that it expects an array.

You need to call it like this:

$obj = {method  =&gt; 'createmultisig', params =&gt; [2, ["$key1", "$key2"]],};
$res = $client-&gt;call($uri, $obj);