the script writer had changed the value of $/.
In reply to Re^2: Line number in a file by Anonymous Monk in thread Line number in a file by ciryon