Re: foreach() and while()

2002-09-27 Thread Paul Johnson
On Fri, Sep 27, 2002 at 01:40:09PM -0700, John W. Krahn wrote: > [EMAIL PROTECTED] wrote: > > When using foreach or while() on an array, how can I access the index of > > the list that foreach()/while() is working upon? Is there an internal > > variable that stores this info like PHP's current()?

Re: foreach() and while()

2002-09-27 Thread John W. Krahn
[EMAIL PROTECTED] wrote: > > Hello, All: Hello, > When using foreach or while() on an array, how can I access the index of > the list that foreach()/while() is working upon? Is there an internal > variable that stores this info like PHP's current()? No, Perl doesn't have a variable like that,

Re: foreach() and while()

2002-09-27 Thread James Edward Gray II
If you need this, I suggest using the good old fashioned for ($i = 0; $i < END; $i++) { }. Nothing broken there, I don't think. James On Thursday, September 26, 2002, at 11:12 PM, [EMAIL PROTECTED] wrote: > Hello, All: > > When using foreach or while() on an array, how can I access the ind