You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 8, 2024. It is now read-only.
JSON objects translated to Perl hash references use : as the separator instead of , or =>, which causes syntax errors.
There can be unbalanced braces in generated code, which causes syntax errors.
JSON containing embedded newlines is single quoted, which double escapes the newlines, causing literal \n characters to appear in embarrassing places. This can be avoided by using qq'...' or regular double quotes instead of single quotes, however that will trigger Perl's string interpolation on the entire string, so it might be necessary to only double quote the newlines:
my$hr = {
'abc'=>'def' ."\n". 'ghi',
};
In order to see this in action, head over to the SparkPost API docs, click the < on the black background near the top right hand corner, click Create Transmission with Inline Parts Content, and scroll down to select Perl from the language dropdown.
The text was updated successfully, but these errors were encountered:
JSON objects translated to Perl hash references use
:
as the separator instead of,
or=>
, which causes syntax errors.There can be unbalanced braces in generated code, which causes syntax errors.
JSON containing embedded newlines is single quoted, which double escapes the newlines, causing literal
\n
characters to appear in embarrassing places. This can be avoided by usingqq'...'
or regular double quotes instead of single quotes, however that will triggerPerl
's string interpolation on the entire string, so it might be necessary to only double quote the newlines:In order to see this in action, head over to the SparkPost API docs, click the
<
on the black background near the top right hand corner, click Create Transmission with Inline Parts Content, and scroll down to selectPerl
from the language dropdown.The text was updated successfully, but these errors were encountered: