DreamT has asked for the wisdom of the Perl Monks concerning the following question:
Ideally, I want to loop the Properties-hash and create the combinations from that. I know how to do it in a static fashion (Defining a number of arrays and looping them), but how to do it dynamically?my %Properties; ... # Outer loop, per $property_id # Inner loop, per value of property: push @{ $Properties->{$property_id} }, { 'Value' => $value, 'Price' => $price, };
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Creating combinations using arrays
by Kenosis (Priest) on Mar 05, 2013 at 16:47 UTC | |
by DreamT (Pilgrim) on Mar 05, 2013 at 17:06 UTC | |
|
Re: Creating combinations using arrays
by blue_cowdawg (Monsignor) on Mar 05, 2013 at 16:30 UTC | |
by DreamT (Pilgrim) on Mar 05, 2013 at 16:33 UTC | |
by LanX (Saint) on Mar 05, 2013 at 23:07 UTC |