in reply to Re^2: Printing a Tag content
in thread Printing a Tag content

No sorry. I was describing a way to read the xml from STDIN. If you want it using your $kwords file then use following version.
open SEARCH, "<$kwords" or die "can't open $kwords $!\n"; { local $/=undef; $_ = <SEARCH>; my @arr = split /(<MS_.>)/; shift @arr; # 1st element stuff before <MS_1>, so shift away my %hash = @arr; print map {($_, $hash{$_})} grep { $hash{$_} =~ $word } keys %hash; } close SEARCH;

Replies are listed 'Best First'.
Re^4: Printing a Tag content
by gzayzay (Sexton) on Apr 03, 2006 at 21:28 UTC
    Thanks you. And Thanks to all other monks for their assistance