in reply to I can't figure out what's wrong with this foreach loop

And this is why you should use 'strict' and 'warnings' pragma in practice. You would have found the bug earlier if you had had these pragmas turned on. As you would have seen a warning saying 'undefined variable is being used.'

Replies are listed 'Best First'.
Re: pragmas are good
by ikegami (Patriarch) on Mar 13, 2011 at 19:18 UTC
    He does have warnings turned on, and his code doesn't issue that warning. @test is an array; it cannot be undefined.
      Yep, that did it. I knew it was something silly. I'll make sure to turn on strict from now on, too. Thanks again! Bryan