- Perl ›
- builtin functions ›
- here
__LINE__ - Get line number on script
Use __LINE__ to get the line number on the script.
__LINE__
Example
This is an example to get the line number.
use strict; use warnings; # Get line number on script __LINE__ print "1: Get the line number name.\n"; print "This line is the". __LINE__. "Line of the script\n";