in reply to Re: foreach count variable
in thread foreach count variable

You needn't flinch, there's nothing wrong with that.

An alternative is:

my @foo = qw(one two three four); for (0..$#foo) { print "$_ : $foo[$_] \n"; }

Andy.