in reply to Implicit loop counter

If you're reading from a file (with the <> operator), you can use the $. special variable. If not, then you'll have to do explicit loop control, with the usual for(;;) form.