in reply to printing line number

perl -lane 'print $. if $F[0]==$F[1]' file
Replace '==' with ' eq ' if you would prefer a string comparison rather than numeric (and use double quotes instead of single-quotes if you're using a DOS shell).