#!/usr/bin/perl -w use strict; my $house = { name => 'old bertha home', guests => [ 'greg', 'thomax', 'zeimart', 'bubba' ], structure => { rooms => [ 'foyer', 'bathroom', 'front lawn', 'kitchen'], address => '121 super road, ny, ny 12866', }, }; for ( @{$house->{guests}} ) { print "$_ is in house: ".$house->{name}; print " in the ". $house->{structure}->{rooms}->[ int(rand(3))] ."\n"; }