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()?
[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,
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