in reply to Re: Overwriting Hash / Array
in thread Overwriting Hash / Array
I'm sorry, that was something I changed before to try some things, I updated the code so it reflects exactly how it works at the moment! The @columns_import array should be outside of the named loop, you are right. Do you have any idea how to get the overwritten array fixed?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Overwriting Hash / Array
by Corion (Patriarch) on Jul 28, 2015 at 08:07 UTC | |
The @columns_import array is not the problem. You are modifying the %column_data_import; hash but always keep the same variable around. Most likely, the line my %column_data_import; must be moved into the loop where the different column data import schedules are held. | [reply] [d/l] [select] |
by iRemix94 (Sexton) on Jul 28, 2015 at 08:18 UTC | |
If I do that, i have to put the line into the loop aswell: push (@columns_import, \%column_data_import);this results in a data structure with wrong data in it, as you can see in the Dumper result here:
| [reply] [d/l] [select] |