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
    Thanks ikegami. But this will push me the value obtained from the regex passes to $serviceref to an array under the hash %index{"ID$counter"}{"sons"} ?? I mean, sons will contain all the matches in an array ?
      yes
        it works!!! thanks a lot ikegami!