The top level of the structure is an array, let's call it "objarray" ...
my @objarray = ();
...(about 90 elements). Each element of "objarray" is a hash.
my @objarray = ( { }, { }, ({ }) x 87, # 87 more elements... { }, );
One of the hash's keys is called "apts".
my @objarray = ( { 'apts' => '???', }, { 'apts' => '???', }, ({ 'apts' => '???', }) x 87, { 'apts' => '???', }, );
The value of that key is a 2D array ... consisting of 2 columns and several rows.
my @objarray = ( { 'apts' => [ [11,12], [13,14], [15,16], ], }, { 'apts' => [ [21,22], [23,24], [25,26], ], }, ({ 'apts' => '???', }) x 87, { 'apts' => [ [91,92], [93,94], [95,96], ], }, );
>perl -wMstrict -le "my @objarray = ( { 'apts' => [ [11,12], [13,14], [15,16], ], }, { 'apts' => [ [21,22], [23,24], [25,26], ], }, ({ 'apts' => '???', }) x 87, { 'apts' => [ [91,92], [93,94], [95,96], ], }, ); ;; print 'elements in array: ', scalar @objarray; print $objarray[89]{'apts'}[2][1]; " elements in array: 90 96

(I cheated a bit on the construction of the array and so could not use the indices in the OP, but you get the idea.)


In reply to Re^3: Syntax for an array of hashes, with 2D array in hash value by AnomalousMonk
in thread Syntax for an array of hashes, with 2D array in hash value by element

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.