in reply to Predefined Variable
perl -e 'die "I died"' outputs "I died at -e line 1." (note the line #)
If "die" alone doesn't do what you need, __LINE__ should (in most cases).