Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

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

by IraTarball (Monk)
on Nov 14, 2001 at 04:44 UTC ( #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
Node Status?
node history
Node Type: note [id://125184]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (4)
As of 2019-05-26 17:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you enjoy 3D movies?



    Results (153 votes). Check out past polls.

    Notices?
    • (Sep 10, 2018 at 22:53 UTC) Welcome new users!