in reply to array of arrays

push @{$aoa[$id]}, ...

This basically takes the value $aoa[$id] and then looks at the array pointed to by it (indicated with the surrounding @{})