in reply to Push array to hash

Your dump is telling you that you that you have pushed multiple reference to the same variable. There is no point in printing its value multiple times. I cannot offer a real fix without seeing the declaration of your variables and the statement that prints the dump. Perhaps you need:
push( @{ $self->{"lags"} }, {%lag_detail} );

This would push a reference to an anonymous hash which contains a current copy of your hash.

Bill

Replies are listed 'Best First'.
Re^2: Push array to hash
by AnomalousMonk (Archbishop) on Jun 24, 2020 at 20:31 UTC
    ... a current copy of your hash.

    A shallow copy of the hash. This may be sufficient for bartrad's use case, but I think it's always worth emphasizing the difference between shallow and deep copying.


    Give a man a fish:  <%-{-{-{-<