in reply to Re: Where is my foreach data going to?
in thread Where is my foreach data going to?

Your change yielded these results:
@athlete[$i,$j] is assigned the value 0.4 Small Bunch Grapes $bug is assigned the value 32 $i$j is assigned 4:2 @athlete[$i,$j] is assigned the value 0.4 carb $bug is assigned the value Medium Pear $i$j is assigned 4:3 @athlete[$i,$j] is assigned the value 0.4 15 $bug is assigned the value carb $i$j is assigned 4:4 @athlete[$i,$j] is assigned the value 0.4 0.4 $bug is assigned the value 16 $i$j is assigned 4:5 @athlete[$i,$j] is assigned the value 0.5 0.1 $bug is assigned the value 0.5 $i$j is assigned 4:6 @athlete[$i,$j] is assigned the value 0.5 $bug is assigned the value 0.2
To be honest, I'm more confused now than I was when I first made this post.

Replies are listed 'Best First'.
Re: Re: Re: Where is my foreach data going to?
by Roger (Parson) on Sep 18, 2003 at 01:23 UTC
    You need to replace all @athlete[$i,$j] with $athlete[$i,$j], even with your print statement. Because the syntax @athelete[$i,$j] is wrong. ;-)

    To understand why, you need to understand what is an array slice ...