Ok, here's what I got so far.

foreach my $Temp (@IsNew){ my %param_2 = ( 'Flag'=>$Temp, #<-- TEST ); foreach my $product (@Products) { my %param = ( 'Code'=>$product, } push(@loop_data_1, \%param); } $loop_data_3{$counter} = @loop_data_1; $param_2{'ProductList'} = \$loop_data_3{$counter}; push(@loop_data_2, \%param_2); @loop_data_1 = (); } $tmpl->param('NumOfProductLists'=>\@loop_data_2);

@loop_data_1 contains the data for the inner loop
@loop_data_2 countain the data for the superior loop (inside it should be arbitray number of different @loop_data_1 arrays). Basically i want to dinamicly add drop down boxes with different \<selected\> elements. That's why I think I need a different @loop_data_1 for each @loop_data_2.

This is where I thought of using or an array of arrays or a hash of arrays...


In reply to Re^4: Using arrays as elements in hash by XMas
in thread Using arrays as elements in hash by XMas

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.