You can't use anything but ordinary letters, underscore and digits on the left hand side, if you aren't quoting:
$req = POST $url, [
SESSID => $sessid,
csrf => $csrf,
domainid => '1234567',
type => 'A',
default => '0',
'record-type' => 'A',
'a-record%5B%5D' => '12.12.12.12',
'aaaa-record' => '',
'cname-record' => ''
];
Now that was the syntax issues in the code.
Also, take a look at perlsyn for hints on how to format perl code.