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:
products[x][prod_number]
products[x][prod_name]
products[x][prod_type]
** There are ten such arrays
I have discovered if the person orders 3 items, there is a variable called "item_count" which means X becomes [0],[1] and [2]
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
For normal variables, ie get the "name/value" pairs, I use this:
use CGI qw/:standard/;
@names=param;
foreach $name(@names){
$value=param($name);
$$name=$value;
}
Any pointers?
+++++
Not sure if this is the correct way to add to this post; I'm still learning system
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?