Another solution is to use the Iterator design pattern. Not only can you get the index, but you can peek at the next value, etc. There are several modules that implement this. Here's one example:
use Array::Iterator; my $i = Array::Iterator->new([EMAIL PROTECTED]); while ($i->hasNext) { print "Current Value is " . $i->getNext . "\n"; print "Current Index is " . $i->currentIndex . "\n"; } -- Mark Thomas Internet Systems Architect _______________________________________ BAE SYSTEMS Information Technology 2525 Network Place Herndon, VA 20171 USA _______________________________________________ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs