foreach (@rooms) { my $rr; @$rr{ qw/TITLE TEXT EXITS THINGS ITEMS/ } = split ":", $_; push @a, $rr; }; return \@a;