in reply to Index in For loop

At this time perl does not allow access to the index within a for loop. There have been suggestions that this be allowed in the past, often centering around giving the deprecated $# variable with this function. $; does not give line numbers. The $. variable does however. See perlvar for all your curiousities about perl's special variables.