title: Data posted as "multidimensional array" (read into arrays: PERL)
body: <p>I'm using a new payment processor, and their data sheet simply says their information is posted as multidimensional array. To quote just a few of the variables:</p>
  
  <pre><code>products[x][prod_number]
  products[x][prod_name]
  products[x][prod_type]
  </code></pre>
  
  <p>** There are ten such arrays </p>
  
  <p>I have discovered if the person orders 3 items, there is a variable called "item_count" which means X becomes [0],[1] and [2]</p>
  
  <p>But what is the method to read in this POSTed data and separate it. Sure it's gonna be a 'foreach' loop of some sort, but what variable names I need is a  mystery </p>
  
  <p>For normal variables, ie get the "name/value" pairs, I use this:</p>
  
  <pre><code>use CGI qw/:standard/;
  
  @names=param;
  foreach $name(@names){
  $value=param($name);
  $$name=$value;
  }
  </code></pre>
  
  <p>Any pointers?</p>
  
  <p>+++++</p>
  
  <p>Not sure if this is the correct way to add to this post; I'm still learning system</p>
  
  <p>my question now is WHAT FORMAT is this data POSTed to STDIN etc. Or more to the point, what will it be read into. Since "products" is a single variable name, would all the data be within a single "$products" variable, or would all the data be contained within @products?</p>