in reply to Remove a line of text

This is (a) problem with your code:
while (<ACTLIST>) { $TheLine = $_; @WordList = "$TheLine"; }
What this does is read in a line from ACTLIST, assign it to $TheLine, then assigns $TheLine to the @WordList array. However, each iteration causes @WordList to get overwritten with the new value of $TheLine, which is probably not what you want.

Try this instead:

while (<ACTLIST>) { push @WordList, $_; }
or, even better:
@WordList = (<ACTLIST>);
...which'll do the same thing.

Gary Blackburn
Trained Killer