Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
Help to improve script that searches a file for key words in a second file.by mastarr (Novice) |
on Mar 29, 2013 at 16:14 UTC ( [id://1026165]=perlquestion: print w/replies, xml ) | Need Help?? |
mastarr has asked for the wisdom of the Perl Monks concerning the following question: Hello everybody, I'm searching a file of annotations for a select list of terms in a second file. It seems to work fine but I'd like to learn alternative ways to do it or learn how to improve it. Specifically, is there is a way I can improve the regular expressions in this line: /(\b($term)\b|$term-)\b|(-$term)\b/i) {Thanks! Here is the full script:
This is the output :
Back to
Seekers of Perl Wisdom
|
|