Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
Re^3: Perl version dependent code (updated)by hippo (Bishop) |
on Feb 04, 2019 at 09:29 UTC ( [id://1229337]=note: print w/replies, xml ) | Need Help?? |
my $c = "ж"; That's an HTML entity and consists of 7 separate characters. If you typed it like this then hopefully it becomes obvious why it doesn't match against "Ж" which is an entirely different string, folding notwithstanding. OTOH, if you didn't type it like this but instead used a unicode literal string such as my $c = "ж";then your code is missing the absolutely necessary use utf8; pragma in order to decode this character properly. (Edited for typo)
In Section
Seekers of Perl Wisdom
|
|