http://qs321.pair.com?node_id=727948


in reply to How to determine current line executing in Script

You can use __LINE__. See "Special literals" in perldata.