I am working my through Perl and grasping some of it! The code below has me puzzled though, can anyone explain it:
for($i = 1; $i <= $ItemCount; $i+=1) {
print "Item $i is $ItemList[$i][3]\n",
" Name: $ItemList[$i][0]\n",
" Amount: $ItemList[$i][1]\n",
" Process: $ItemList[$i][2]\n\n";
}
I understand the "for loop" fine. It is the next part that puzzles me. I know the format
$itemlist[x] refers to position x in the array @itemlist but what does the
$ItemList[$i][0] refer to? Basically, what is that $i doing in there!
Thanks