in reply to how can push value from regex to a array of hash of hashes
With an array, you'd do
push @array, $value;
So with an array ref, you do
push @{ $array_ref }, $value;
In this case, that means
push @{ $index{"ID$counter"}{"sons"} }, $serviceref;
What you currently have,
$index{"ID$counter"}{"sons"} = [ $serviceref ];
replaces the that currently exists at $index{"ID$counter"}{"sons"}.
By the way, please wrap code in <c>...</c> tags.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: how can push value from regex to a array of hash of hashes
by Sombrerero_loco (Beadle) on Jan 07, 2009 at 14:51 UTC | |
by ikegami (Patriarch) on Jan 07, 2009 at 14:59 UTC | |
by Sombrerero_loco (Beadle) on Jan 07, 2009 at 15:52 UTC |