if $/(input record separator) is '\n',
use $. which is used to get the current line number.
for ur problem, use $` and count the number of \n which yields the line number.(But using $` makes program run slow)
cheers
In reply to Re: Line number in a file
by murugu
in thread Line number in a file
by ciryon
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |