powerhouse has asked for the wisdom of the Perl Monks concerning the following question:
Now my problem is that since it's a 'search' function, I have a link with the query text in there something like this: <a href="http://www.mydomain.com/index.cgi?pg=search&q=$_query"> since $_query contains the text that I am searching for, it will inadvertantly 'switch' the q=$_query part of the text with the <font... text.my $__highlight_to_switch = qq~<font class="highlight">$in{highlight_t +ext}</font>~; $_page_content_var =~ s/$in{highlight_text}/$__highlight_to_switch/eg;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Switching out text only in a variable
by Zaxo (Archbishop) on Nov 19, 2004 at 05:29 UTC | |
by powerhouse (Friar) on Nov 19, 2004 at 05:48 UTC | |
by diotalevi (Canon) on Nov 19, 2004 at 07:09 UTC | |
|
Re: Switching out text only in a variable
by NetWallah (Canon) on Nov 19, 2004 at 05:31 UTC |