Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Script resultspush @TestVals, { A => $var1, B => $var2, C => $var3, D => $var4 } foreach my $row (@TestVals){ print Dumper $row; }
What is this type of struture called? Array of hash? How do I access each item within $row? Like $row->A? Thanks$VAR1 = { 'A' => 'TEST DATA 1', 'B' => 'TEST DATA 2', 'C' => 'TEST DATA 3', 'D' => 'TEST DATA 4', };
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: What data structure is this and how to access?
by roboticus (Chancellor) on Jan 18, 2012 at 11:38 UTC | |
by tobyink (Canon) on Jan 18, 2012 at 12:48 UTC | |
by roboticus (Chancellor) on Jan 18, 2012 at 13:10 UTC | |
by jethro (Monsignor) on Jan 18, 2012 at 15:15 UTC | |
|
Re: What data structure is this and how to access?
by planetscape (Chancellor) on Jan 18, 2012 at 12:14 UTC | |
|
Re: What data structure is this and how to access?
by JavaFan (Canon) on Jan 18, 2012 at 14:10 UTC | |
|
Re: What data structure is this and how to access?
by Anonymous Monk on Jan 18, 2012 at 11:40 UTC |