The token __LINE__ will give you what you want. You can use it as your exit status or print it before exiting. die will also (by default) tell you what line it exited at, but you exit with an error code.
Caution: Contents may have been coded under pressure.