in reply to Running a Code with Multiple Sets of Parameters Automatically

So you want a HoA (hash of arrays)? Something like this:

my %Params = ( 'ParamGroup1' => [1, 2, 3], 'ParamGroup2' => [3, 4, 5], 'ParamGroup3' => [1, 1, 1] );

Perl is Huffman encoded by design.

Replies are listed 'Best First'.
Re^2: Running a Code with Multiple Sets of Parameters Automatically
by polettix (Vicar) on Jul 25, 2005 at 10:19 UTC
    Which means that the OP can use map:
    my %all_results = map { $_ => add_them(@{$Params{$_}}) } sort keys %Pa +rams;
    I put sort just to preserve the exact order of calls to add_them, just in case some state is preserved inside the function itself.

    Flavio
    perl -ple'$_=reverse' <<<ti.xittelop@oivalf

    Don't fool yourself.