CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
***case sensitive problem***

 



Jesjoshan
Novice

Aug 25, 2016, 12:49 AM

Post #1 of 3 (1905 views)
***case sensitive problem*** Can't Post

While I converted some named entity to hexa-decimal, it has some case problem;

$xmltext =~s/\ω/\&\#x003C9;/g;
$xmltext =~s/\Ω/\&\#x003A9;/g;

Ω also converted to ω. I need to convert
ω should ω
Ω should Ω

Kindly advise.


BillKSmith
Veteran

Aug 25, 2016, 5:00 AM

Post #2 of 3 (1897 views)
Re: [Jesjoshan] ***case sensitive problem*** [In reply to] Can't Post

Please post a complete program which we can run and see your problem. I cannot duplicate it.

Code
use strict; 
use warnings;
my @ins = ('ω', 'Ω');
foreach my $xmltext (@ins) {
print "$xmltext => ";
$xmltext =~s/\ω/\&\#x003C9;/g;
$xmltext =~s/\Ω/\&\#x003A9;/g;
print $xmltext, "\n";
}

OUTPUT:
ω => ω
Ω => Ω

Good Luck,
Bill


Jesjoshan
Novice

Aug 25, 2016, 8:53 PM

Post #3 of 3 (1885 views)
Re: [BillKSmith] ***case sensitive problem*** [In reply to] Can't Post

Thanks a lot Bill, Now it's working.

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives