in reply to Syntax for an array of hashes, with 2D array in hash value
It's easier than that. Try my $value = $objarray[72]{'apts'}[3][1];.
The thing to remeber is that Perl arrays and hashes only ever store scalar values, but a scalar can be a reference to something complicated like an array or a hash. Generally in Perl you use -> to dereference stuff, but Perl allows you to omit the -> when you have a nest of references as in the case you describe.
The other thing to remember is that in Perl the sigil tells you what type is returned so if you want a scalar value you need to use a $ up front.
|
|---|