It seems pretty simple to me. Am I missing something?my $_index; foreach (@list) { blah(); print "You are on line ", $_index++, ".\n"; }
In reply to Re: Implicit loop counter
by Benedictine Monk
in thread Implicit loop counter
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |