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

I'm think this is wrong (it's looks very strange for me):

$loop_data_3{$counter} = @loop_data_1; $param_2{'ProductList'} = \$loop_data_3{$counter};

Maybe you want:

$loop_data_3{$counter} = \@loop_data_1; $param_2{'ProductList'} = $loop_data_3{$counter};

Replies are listed 'Best First'.
Re^6: Using arrays as elements in hash
by XMas (Initiate) on Nov 01, 2007 at 04:54 UTC
    Nope, that's the first thing I tryed. What that does is give every hash element a reference to @loop_data_1, whitch means that all the <TMPL_LOOP>'s will use a reference to the same array

    $loop_data_3{1} = \@loop_data_1;
    $loop_data_3{2} = \@loop_data_1; (same data, not what I need)