in reply to element of an array of arrays

I am a bit confused about all this joining and splitting. All you need to do is:

use strict; use warnings; my @Records; push( @Records, [ "AAA", 20130610, 730, 1015, "\n" ] ); push( @Records, [ "BBB", 20130610, 1015, 1200, "\n" ] ); push( @Records, [ "CCC", 20130610, 1230, 1400, "\n" ] ); push( @Records, [ "DDD", 20130610, 1415, 1530, "\n" ] ); print $Records[1][2], "\n";

Replies are listed 'Best First'.
Re^2: element of an array of arrays
by AnomalousMonk (Archbishop) on Jun 17, 2013 at 13:59 UTC

    And with greater terseness and, I would argue, much greater readability and maintainability:

    >perl -le "use strict; use warnings; use Data::Dump; ;; my @Records = ( [ 'AAA', 20130610, 730, 1015, qq{\n} ], [ 'BBB', 20130610, 'Hello', 1200, qq{\n} ], [ 'CCC', 20130610, 1230, 'There!', qq{\n} ], [ 'DDD', 20130610, 1415, 1530, qq{\n} ], ); ;; print $Records[1][2], qq{ $Records[2][3]}; ;; dd \@Records; " Hello There! [ ["AAA", 20130610, 730, 1015, "\n"], ["BBB", 20130610, "Hello", 1200, "\n"], ["CCC", 20130610, 1230, "There!", "\n"], ["DDD", 20130610, 1415, 1530, "\n"], ]