How is you html search form written? The client should be providing the search term from user input, and it doesn't know anything about your $_query variable.
The cgi-lib library is very old now. It won't cope with new-fangled standards like ';' between query terms. You'd do well to replace with CGI.pm, which has some cgi-lib compatibility functions if you don't want to do a lot of rewriting.
Your substitution looks ok to me. You may want to split up the search text on spaces and do your substitution as an alternation of intividual search terms.
After Compline,
Zaxo
In reply to Re: Switching out text only in a variable
by Zaxo
in thread Switching out text only in a variable
by powerhouse
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |