I am trying to replace occurrences of certain words in text with hyperlinks. The replacement works ok if I ensure the text to match is the same case as the pattern.
The problem is that the text could be Downloads, DOWNLOADS, DownLoads etc.
I can match the presence of the required word by forcing upper case but how do I do the replacement?
According to my docs, the 'i' operator should work but no replacement is made.
Could someone please tell me what I am doing wrong?
Keith
The problem is that the text could be Downloads, DOWNLOADS, DownLoads etc.
I can match the presence of the required word by forcing upper case but how do I do the replacement?
Code:
if(uc($styl_res[4])=~ m/$TITLE_NAMES[$kx]/){
According to my docs, the 'i' operator should work but no replacement is made.
Code:
$styl_res[4]=~ s/$TITLE_NAMES[$x]/$LINK/i;
Keith