Data::Dumper is your friend. Here's what it gives me for your original code:

$VAR1 = [ { '6' => 'Summary by Phase', 'rpt_descr' => 'Summary by Segment', '3' => 'Cash Balance', '7' => 'Summary by Segment', '2' => 'QTD/PTD Financial Information', 'rpt_no' => '7', '1' => 'Fiscal Year-to-Date Financial Information', '4' => 'Financial Status', '5' => 'Financial Summary Status' }, $VAR1->[0], $VAR1->[0], $VAR1->[0], $VAR1->[0], $VAR1->[0], $VAR1->[0] ];

Not what you want!

By changing your loop to:

foreach $key ( sort keys %rpt_tbl ) { push( @radio_loop, +{ rpt_no => $key, rpt_descr => $rpt_tbl{ $key +} } ); }

It gives me:

$VAR1 = [ { 'rpt_descr' => 'Fiscal Year-to-Date Financial Information' +, 'rpt_no' => '1' }, { 'rpt_descr' => 'QTD/PTD Financial Information', 'rpt_no' => '2' }, { 'rpt_descr' => 'Cash Balance', 'rpt_no' => '3' }, { 'rpt_descr' => 'Financial Status', 'rpt_no' => '4' }, { 'rpt_descr' => 'Financial Summary Status', 'rpt_no' => '5' }, { 'rpt_descr' => 'Summary by Phase', 'rpt_no' => '6' }, { 'rpt_descr' => 'Summary by Segment', 'rpt_no' => '7' } ];

AND some output!

HTH

--
"To err is human, but to really foul things up you need a computer." --Paul Ehrlich


In reply to Re: HTML::Template, TMPL_LOOP problem by LTjake
in thread HTML::Template, TMPL_LOOP problem by Lori713

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.