in reply to Printing a Tag content
#!/usr/bin/perl -w print ("Enter the word to search >> "); chomp ($word = <STDIN>); $/=undef; $_=<>; 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;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Printing a Tag content
by Anonymous Monk on Apr 03, 2006 at 20:57 UTC | |
by codeacrobat (Chaplain) on Apr 03, 2006 at 21:23 UTC | |
by gzayzay (Sexton) on Apr 03, 2006 at 21:28 UTC | |
|
Re^2: Printing a Tag content
by codeacrobat (Chaplain) on Apr 04, 2006 at 12:09 UTC |