in reply to file line

Is there a __LINE__ style internal that I can use to skip the $x++?

Sure. Search in perlvar for $.