I'm not quite sure what you're asking, but maybe this will give some insight:

Win8 Strawberry 5.8.9.5 (32) Wed 05/11/2022 18:46:44 C:\@Work\Perl\monks >perl use strict; use warnings; use Data::Dump qw(dd); my @matrix = ( [ qw(00 01 02 03) ], [ qw(10 11 12 13) ], [ qw(20 21 22 23) ], [ qw(30 31 32 33) ], [ qw(40 41 42 43) ], [ qw(50 51 52 53) ], ); # dd \@matrix; # for debug my @row_set = (0, 2); my @col_set = (3, 0, 1); for my $ar_entry (@matrix[ @row_set ]) { printf "'%s' '%s' '%s' \n", @{$ar_entry}[ @col_set ]; } for my $i_row (@row_set) { printf "row %d: '%s' '%s' '%s' \n", $i_row, @{ $matrix[$i_row] }[ +@col_set ]; } my @sub_matrix = map { [ @{ $_ }[ @col_set ] ] } @matrix[ @row_set ]; # my @sub_matrix = map [ @{ $_ }[ @col_set ] ], @matrix[ @row_set ]; dd \@sub_matrix; ^Z '03' '00' '01' '23' '20' '21' row 0: '03' '00' '01' row 2: '23' '20' '21' [["03", "00", "01"], [23, 20, 21]]


Give a man a fish:  <%-{-{-{-<


In reply to Re^9: reading a JSON object by AnomalousMonk
in thread reading a JSON object by anautismobserver

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.