Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Help with creating and passing of an array...

by IraTarball (Monk)
on Nov 14, 2001 at 04:44 UTC ( [id://125184]=note: print w/replies, xml ) Need Help??


in reply to Help with creating and passing of an array...

I think I found your problem

The array @PER_Data; is outside of the while loop. This means that it is not going to be destroyed until the program ends. So the line

push @major_PER_Data, \@PER_Data;
pushes the same reference over and over again. Then the next time through the modification overwrites the data you thought you saved.

you can fix this by either moving the declaration of @PER_DATA inside the while loop or by changing the above line to

push @major_PER_Data, [@PER_Data];

Hope this helps,
Ira,

"So... What do all these little arrows mean?"
~unknown

Replies are listed 'Best First'.
Re: Re: Help with creating and passing of an array...
by basicdez (Pilgrim) on Nov 14, 2001 at 19:16 UTC
    Thank you so much for you wonderful help. That is exactly what I was looking for. peace, LOVE and ((code)) basicdez

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (2)
As of 2024-04-20 06:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found