$Cell[1] = { CellType => "ROText", Row => 0, Col => 0, Contents => "Bank\\Branch\\Dept:" }; $Cell[2] = { CellType => "ROText", Row => 1, Col => 0, Contents => "Requestor:" }; foreach (1 .. $#Cell) { if (${$Cell[$_]}{'CellType'} == "Text") { $cell = $grid->Text( -width => 17, -height => 1, )->grid( -row => ${$Cell[$_]}{'Row'}, -sticky => "nsew", -column => ${$Cell[$_]}{'Col'}, ); } elsif (${$Cell[$_]}{'CellType'} == "ROText") { $cell = $grid->ROText( -width => 17, -height => 1, )->grid( -row => ${$Cell[$_]}{'Row'}, -sticky => "nsew", -column => ${$Cell[$_]}{'Col'}, ); }; $cell->Contents("${$Cell[$_]}{'Contents'}"); };