in reply to Simple perl one-liner for transforming text files

perl -ne 'print ++$n,". $1 " if /^name:\s*(.*)/; print $1,$/ if /^date +:\s*(.*)/'
or, for Win32:
perl -ne "print ++$n,qq(. $1 ) if /^name:\s*(.*)/; print $1,$/ if /^da +te:\s*(.*)/"
                - tye