Really simple question.

Robert Bannocks londonperlmongers at hotpop.com
Thu Feb 8 15:35:42 GMT 2007


is there an internal perl variable is $<somethins> that will tell you 
index of an array you are at in a foreach loop

i.e. in

foreach (@arrayname)
{
  ...do some stuff..
}

other than setting a count before the loop and incrementing it each time 
how can I find out with in ...do some stuff...
how far through @arrayname I am?

Regards



More information about the london.pm mailing list