my %desc; $desc{'room'} =<## __DATA__ [room] some text here, probably something a few lines long [wall] another text here, probably something a few lines long [sometimes with braces] sometimes with a few paragraphs #### my %desc; my $key = 'error'; for () { if (/^\[(\w+)\]\s*$/) { $key = $1; } else { $desc{$key} .= $_; } } die if defined $desc{'error'}; #### my $data=<