in reply to Simple looping question.

LABEL: for ... foreach... foreach ... next LABEL;

but in this specific case, I wouldn't use the outer for loop. Pseudocode below:

foreach ArrayReference in my Reference { foreach value in my ArrayReference { print (value >=1 and value < 33) ? highlighted cell : regu +lar cell; } }

I'm assuming value will only be integer. If it could have real values between 1 and 33, my pseudocode would have different behavior than your original pseudocode.

Replies are listed 'Best First'.
Re: Re: Simple looping question.
by Zed_Lopez (Chaplain) on Jan 09, 2004 at 20:15 UTC

    Thinking about it more, my pseudocode still has different behavior than yours... you'd be starting to print out the entire table as represented by your arrayref of arrayrefs 32 times, starting over every time you hit an integer value between 1 and 32. I'd guess this probably isn't what you want.