How to get the current line number of a file opened using Perl December 1, 2023 by Tarik Use $. (see perldoc perlvar).