http://qs321.pair.com?node_id=617107


in reply to Push hash reference on array problem

In the loop you are pushing a reference to the same hash onto the list repeatedly, then deleting the data in that hash at the end of the loop.

Declare %dfdata_row in the body of the loop, and don't assign () to it after pushing it onto the list.

  • Comment on Re: Push hash reference on array problem

Replies are listed 'Best First'.
Re^2: Push hash reference on array problem
by Anonymous Monk on Aug 21, 2014 at 15:54 UTC
    Try it slightly modified:
    push (@dfdata_out, \%dfdata_row);