in reply to Re^8: Hash of Arrays or Arrays of arrays? and how proceed?
in thread Hash of Arrays or Arrays of arrays? and how proceed?
In your original script you had a line "use strict;". Did you remove that line? It does seem that way, because otherwise the line "@fields = sort (@ElencoCampi);" would have given an error because you are using the global variable @fields instead of a local variable generated with my.
If you add a line "print \@fields;" to your loop you will see the problem, the reference never changes, it is always the same. But you need a new variable in every iteration of the loop so that they point to different memory locations
Change that line to "my @fields = sort (@ElencoCampi);" and your problem should go away.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^10: Hash of Arrays or Arrays of arrays? and how proceed?
by paride (Initiate) on Aug 09, 2011 at 08:36 UTC | |
by jethro (Monsignor) on Aug 09, 2011 at 15:00 UTC | |
by paride (Initiate) on Aug 10, 2011 at 09:20 UTC | |
by jethro (Monsignor) on Aug 10, 2011 at 12:43 UTC | |
by paride (Initiate) on Aug 10, 2011 at 13:45 UTC |