Eric Walker <[EMAIL PROTECTED]> wrote:

> I got it so I need a counter which sends me to a for loop instead of a
> foreach.  Thanks..
> 
> perlknucklehead

I believe that 'for' and 'foreach' are completely interchangable. I remember
reading somewhere that one was a synonym for the other.

Maybe someone who is more familiar with the internals can confim that.


-Jeff

 
> On Thu, 2003-12-18 at 17:07, Paul Johnson wrote:
>     On Thu, Dec 18, 2003 at 04:57:26PM -0700, Eric Walker wrote:
>     
>     > Hello all
>     > While traversing a loop across and array, how can I access array
>     > positions further down the array, like say if I am on a loop looking
> at
>     > position 23, how can I check the value of say position 24 or 32 while
> my
>     > loop counter is on position 23.
>     
>     Hmmm?  Add 1 or 9 to your loop counter?
>     
>     Or have you not actually got a loop counter?  If that is the case the
>     easiest solution is probably to get one.
>     
>     Or have I completely misunderstood?  Showing the code is usually more
>     productive than simply describing the problem.
>     
>     -- 
>     Paul Johnson - [EMAIL PROTECTED]
> http://www.pjcj.net
>     
>     
> 
> 
> -- 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> <http://learn.perl.org/> <http://learn.perl.org/first-response>
> 
> 


__________________________________
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing.
http://photos.yahoo.com/

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to