Or maybe you can convert your list into a file, and use the line number variable to do what you want.
Cheers, Jing On 9 Aug 2013, at 01:05, Unknown User <[email protected]> wrote: > > Hello, > > > If i am iterating through the elements in an array, at any point is it > possible to say which element i am handling without using a counter? Are > there any builtins that i can use for it? > > ie > foreach my $element (a..z) { > ... > if ( i am the 5th element ) { handle me special } > > } > > Thanks, > -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] http://learn.perl.org/
