in reply to tagging question

My code is,

while (<DATA>){ s#^(\w{2}).*#<$1>$&<\/$1># && print } __DATA__ lg alkjslkjs sl slksjlkjslkjs slkjslkjs