while () { chomp; print (LIST "$_","\n") if /\<(name|keywords|description|results)\>/ .. /\<\/$1\>/; }