Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
if($_ =~ /^Product\sname:\s(\w.*)/) { $product[$prodCount] =$1; #print "$1<br>\n"; } if($_ =~ /^Option\sName:\s(\w.*)/) { $product[$prodCount][$optionPos] = $1; for my $x (0..$#product) { for my $y (0..$#{$product[$x]}) { print "$product[$x][$y]<br>\n";# $products = join(" " , $products,$product[$x][$y]); } }
$product[$x] is the Product Name $product[$x][$y] is the products option list(color, size etc)
Can't use string ("Promo - Product ID 1 ") as an ARRAY ref while "strict refs" in use at modules/productParser + line 77.
Any suggestions?Line 77 is $product[$prodCount][$optionPos] = $1;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Multi-dimensional Array Issue
by ikegami (Patriarch) on Jul 15, 2005 at 19:04 UTC | |
by Anonymous Monk on Jul 15, 2005 at 19:09 UTC | |
by ikegami (Patriarch) on Jul 15, 2005 at 19:13 UTC | |
by Anonymous Monk on Jul 15, 2005 at 19:39 UTC |