foreach (1 .. $#Cell) { if (${$Cell[$_]}{'CellType'} == "Text") { $cell = $grid->Text( -width => 17, -height => 1, -state =>'normal', )->grid( -row => ${$Cell[$_]}{'Row'}, -column => ${$Cell[$_]}{'Col'}, ); } elsif (${$Cell[$_]}{'CellType'} == "ROText") { $cell = $grid->Text( -width => 17, -height => 1, -state =>'disabled', )->grid( -row => ${$Cell[$_]}{'Row'}, -column => ${$Cell[$_]}{'Col'}, ); }; $cell->Contents("${$Cell[$_]}{'Contents'}"); };