in reply to Re: Running a string through a filter program and recieving the output as a string
in thread Running a string through a filter program and recieving the output as a string

That's it almost. By saying "filter program" I think the OP means the words have to be piped to the filter program. Filters usually take STDIN as input.

Also, from the description of the OP I assume his program will deal with different filters, set by (e.g.) commandline parameters.

So
my $newword = `sed $word`;
should become
my $newword = `echo '$word' | $filterprogram`;
Where $filterprogram has to be set somewhere else in the script.

$\=~s;s*.*;q^|D9JYJ^^qq^\//\\\///^;ex;print