String eval does the trick.
In addition to the other solutions that avoid string eval and its inherent risks, there's YAML::Syck::Load although that's probably an overkill:
print Load '--- "Hello\nWorld\n"';
In reply to Re^2: Line break interpretation
by blazar
in thread Line break interpretation
by fpondemer
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |