As kyle explained, you want
$inv->{ranges} = \@ranges;
And, in order to then iterate over $inv->{ranges} in your foreach loop, you'll also need to dereference it, like this:
foreach my $range ( @{$inv->{ranges}} ) { ... }
In reply to Re: Arrays/Lists of Hashes
by almut
in thread Arrays/Lists of Hashes
by BrentD
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |