Hi,

I'm russian perl programmer and I have a problem:

There is the part of Perl code:
# Remark: Cyrillic alphabet is used in the rest of code
# Remark: in the variable $query first letter of first word is uppercased, but 
in the 
# array @keyw_array this letter is lowercased.
[code]
$query = "Красивый дом на Реке"; 
@keyw_array = qw(красивый реке);
[/code]
It is necessary to mark up in the $query all the words that array @keyw_array 
contains by bold style.
Then I write next instructions:
[code]
$query =~ s/($_)/<strong>$1<\/strong>/i for @keyw_array;
print $query;
# prints Красивый дом на Реке
[/code]
But on the server side the substitutions doesn't work properly (no change in 
the $query) although I specially used key 'i' in regex (s///i).
Locally using pragma 'use locale' resolves the problem, i.e.:
[code]
use locale;
$query =~ s/($_)/<strong>$1<\/strong>/i for @keyw_array;
print $query;
# prints <strong>Красивый</strong> дом на <strong>Реке</strong>
[/code]
As you may see the substitutions have done properly.
But when I try this on the server side I have no substitutions again.

What is the matter? 
Is somebody able to point me the right way?
Thanks.

AZtpa,




Reply via email to