#!/usr/bin/perl use strict; use warnings; my %desc; { local $/ = ""; while () { s/\\\\/\n/; s/^(.*)\n//; $desc{$1} = $_; } } print "{$_} => \n$desc{$_}" for (keys %desc); __DATA__ house_west You are standing in an open field west of a white house, with a boarded front door. \\ There is a small mailbox here. house_south You are facing the south side of a white house. There is no door here, and all the windows are boarded. house_behind You are behind the white house. A path leads into the forest to the east. \\ In one corner of the house there is a small window which is slightly ajar.