Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Push hash reference on array problem

by imp (Priest)
on May 23, 2007 at 20:15 UTC ( #617107=note: print w/replies, xml ) Need Help??


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);

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://617107]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (6)
As of 2016-09-25 18:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Extraterrestrials haven't visited the Earth yet because:







    Results (471 votes). Check out past polls.