in reply to Re^2: declare my variable in loop
in thread declare my variable in loop
With your code, the my declaration will create a fresh @Array_Vals every trip around the loop.
If you want to see your data structure, use Data::Dumper to show it:
my @Array_of_ALL_Vals; for my $iloop (0 .. 10){ my @Array_Vals; . Code in here to populate @Array_of_Vals . push @Array_of_ALL_Vals,\@Array_Vals; print Dumper \@Array_of_ALL_Vals; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: declare my variable in loop
by gauss76 (Scribe) on Aug 08, 2017 at 08:47 UTC | |
by Corion (Patriarch) on Aug 08, 2017 at 09:50 UTC | |
by AnomalousMonk (Archbishop) on Aug 08, 2017 at 10:01 UTC |