When I try to print element [0]1 from each matrix in each file, ... Does anyone have any idea why this is wrong?
@list is declared outside your for loop, so you are accumulating the data for all the files into the array; thus whatever value you put into $list[0][1] first, will never change.
If you move the declaration of @list inside the for loop, you'll probably get what you want.
In reply to Re: read files into 2D arrays and print element?
by BrowserUk
in thread read files into 2D arrays and print element?
by fasoli
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |