in reply to Keeping a Count in foreach

You could use a counter:

my $count=0; foreach $e (@s) { $count ++; print "$e is the $count"."th element\n"; }

Neil Watson
watson-wilson.ca