http://www.perlmonks.org?node_id=538142


in reply to Reading b/w tags

hi gzayzay,

try to replace your 'while' loop with this one:

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

Enjoy,
Mickey