I'm trying to print just the /bob part to my screen. I have a command line example I really think should work. Keep in mind that the content between the <NAME> </NAME> is always changing.
$/tmp> perl -ne 'print /<NAME>($.)<\/NAME>/' file
Expected output: /bob
I'm not sure what I'm doing wrong. Many thanks for help.
$. counts how many lines of input have gone by. Sometimes it's also seen as "match the first character after a newline", but that never works as intended, too.