$VAR1 = { 'bedroom 2' => { 'frames' => { '120x180' => '1', '100x75' => '2' }, 'windows' => '3', 'total_length' => '1300' }, 'office 1' => { 'frames' => { '155x135' => '1', '140x135' => '1', '120x120' => '3' }, 'windows' => '5', 'total_length' => '2570' } }; bedroom 2 3 windows $ 300.00 materials $ 650.00 total $ 950.00 office 1 5 windows $ 500.00 materials $1285.00 total $1785.00 Total: $2735.00