perl -ne 'BEGIN {our $n=1; $/="";}; print "=Line:$n, Record:$.==\n$_"; $n += y/\n/\n/;'< textfile