Is it possible to get the current source line number in Perl?
The equivalent in C++ is __LINE__
.
Perl – How to print source line number in Perl
line-numbersperl
Related Question
- Perl – How to get the name of the current subroutine in Perl
- C++ – C/C++ line number
- Perl – How to get the filename and line number in Perl
- How to make phpstorm display line numbers by default
- Perl – Line number of a file in Perl
- C# – How to get the current line number
- Perl – Current file line number with $. variable
Best Solution
The
__LINE__
literal is documented in the Special Literals section of the perldata man page.or