Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re: how do I open each line of a text file into seperate arrays?by Sherlock (Deacon) |
on May 01, 2001 at 01:22 UTC ( [id://76757]=note: print w/replies, xml ) | Need Help?? |
I'd try something like this: This will store a reference to each array within one big array, called @majorArray. You can then access each array like this: or you can get at all of the contents of every array like this: If you're having trouble with references, you might want to try checking out How do I loop over a reference to an array? or simply look up references in the documentation. Or, even more simply, push the actual array into the larger array to give yourself a two-dimensional array. Hopefully, this'll help you get going. Good luck! - Sherlock
In Section
Seekers of Perl Wisdom
|
|