You still left out the portion where you are reading from
@{$EnvsToRun->{data}}. The thing to keep in mind here is that
$EnvsToRun->{data} is a reference to an array. This array holds one entry per environment. That entry itself is a reference to another, inner array, which has 3 elements. I suspect you are reading it something like this:
my ($environment, $duration, $config) = @{$EnvsToRun->{data}};
That's not right, you'll get an array ref in
$environment. You forgot that
@{$EnvsToRun->{data}} holds many inner lists, each of them with 3 elements in it. To get the first one out by itself, you'd do something like this (note the
->[0]):
my ($environment, $duration, $config) = @{$EnvsToRun->{data}->[0]};
In practice, to deal with all of the combinations, you need to iterate over the outer array and then for each item there process the inner array. Like this:
for my $CurrentEnv (@{$EnvsToRun->{data}}) {
my ($environment, $duration, $config) = @$CurrentEnv;
...
}
If you don't want many inner lists, but just the one, you shouldn't be using push at all when assigning to
$EnvsToRun->{data}. Instead, a simple assignment:
$EnvsToRun->{data} = [$environment, $duration, $config];
... later ...
($environment, $duration, $config) = @{$EnvsToRun->{data}};
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.