in reply to PERL REST API Post script

The IP works but the rest does not get parsed into the req for the content.
$req->content('{"data":{"Address": "$Address","User": "$user","Passwor +d": "$passcode","Domain":"","LockCode":""}}');

Single quotes don't interpolate. See Quote and Quote-like Operators in perlop for more info.