Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^5: Split file output into array of arrays

by GrandFather (Saint)
on Feb 17, 2010 at 19:27 UTC ( [id://823792]=note: print w/replies, xml ) Need Help??


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

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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://823792]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (2)
As of 2025-07-19 23:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.