Is it possible to get the current source line number in Perl? The equivalent in C++ is __LINE__.
__LINE__
The __LINE__ literal is documented in the Special Literals section of the perldata man page.
print "File: ", __FILE__, " Line: ", __LINE__, " ";
or
warn("foo");
1.4m articles
1.4m replys
5 comments
57.0k users