in reply to Re^3: Split file output into array of arrays
in thread Split file output into array of arrays

GrandFather -

No worries there. I asked for an array of arrays, and that's what you gave me. I was just wanting to clarify that the method of accessing them would be as I posted earlier

$records[firstarray][firstrecord] $records[secondarray][firstrecord] . .

I'll work on sorting it out and post back if I have problems.

Regards,
Scott

Replies are listed 'Best First'.
Re^5: Split file output into array of arrays
by GrandFather (Saint) on Feb 17, 2010 at 19:27 UTC

    That looks backwards to me. In fact I'd code access as:

    for my $record (@records) { for my $line (@$record) { .... } }

    $records[firstrecord][firstarray] could also be written $records[firstrecord]->[firstarray] to emphasise that @records is an array of references to arrays. Keep in mind that Perl only allows scalar values for arrays and hashes, but a reference to something (like and array) is a scalar.


    True laziness is hard work