#!/usr/bin/perl use YAML; use strict; my $hashref = Load(<<'...'); --- title: This is my title body: | This is some text. Here's a newline: Yet more text. ... print Dump($hashref);