title: loading data from file into 2d array
body: <p>I am just starting with perl and would like some help with arrays please.
  I am reading lines from a data file and splitting the line into fields:</p>
  
  <pre><code>open (INFILE, $infile);
  do {
  my $linedata = &lt;INFILE&gt;;
  my @data= split ',',$linedata;
  ....
  } until eof;
  </code></pre>
  
  <p>I then want to store the individual field values (in @data) in and array so that the array looks like the input data file ie, the first "row" of the array contains the first line of data from <code>INFILE</code> etc.</p>
  
  <p>Each line of data from the infile contains 4 values, x,y,z and w  and once the data are all in the array, I have to pass the array into another program which reads the x,y,z,w and displays the w value on a screen at the point determined by the x,y,z value. I can not pas the data to the other program on a row-by-row basis as the program expects the data to in a 2d matrtix format.
  Any help greatly appreciated.
  Chris</p>