batch or wordlists search and replace

Hello Experts!

I've become perplexed :confused: as to why I can't get this to work and have given up the male "I can do it" attitude. I am asking the unix experts.

The script I am writing involves reading a file that contains thousands of keywords (not csv), just one line after another of keywords and keyword phrases. I am attempting to read each line and carry this "keyword variable" into sed or perl and search and replace the variables in a single file if found.

#!/bin/bash
set +v
IFS=$'\n'

for i in `cat wordlist.txt | dos2unix | sed -e 's/ *$//'`
do
#./mksr "$i" "\<a href=\"http:\/\/www.domain.com\"\>$i\<\/a\>" ./articles.txt
#perl -pi -e 's/search/replace/g' *.text
perl -pi -e 's@$i@<a href=http://www.domain.com>$i</a>@g' articles.txt
#cat articles.txt | sed -e 's@$i@<a href=http://www.domain.com>$i</a>@' > articles.tempfile
#cat articles.txt | tr '$i' '<a href=http://www.domain.com>$i</a>' > articles.tempfile
echo "<a href=http://www.domain.com>$i</a>"
done

------------wordlist-----------
dj
djs
dvd
card
free
ring
vows
bride
cakes
dress
-----------wordlist---------

-----------article-----------
Title: Beverages 101

Subhead: Wines for your Special Day

As the last note of recessional music fades into history and the last scrap of choice confetti (be it birdseed or rice) hits the earth, the guests rise from their seats and begin to scour the premises, all with one target on their minds ...
-----------article------------

What the heck am I doing wrong in the for loop?

Any help would be greatly appreciated! I've spend three days on this and can't seem to find one example on the internet of someone trying to do this. Lots of examples of how to do a single word sed s/blah/blah2/g on many files, but no multiple interactions of search and replace same file with a keyword lists!

...sorry I should have put this in shell programming
ugh!! :confused: