use utf8 ?
You should dump your string to see what's inside, best inspected with Devel::Peek
Tested on my mobile
$ perl use utf8; $string = "cant"; $string =~ tr//"'"/; print $string . "\n"; __END__ "can't" $
Without utf8 Perl is considering every string to be a byte string not a character string (the flag will be missing)
Your multibyte unicode character might look ok in your editor but Perl will try to transliterate individual bytes.
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
In reply to Re: tr/// not working for replacment of curly quotes (use utf8)
by LanX
in thread tr/// not working for replacment of curly quotes
by nysus
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |