in reply to em and en dash problem

Em dash:

En dash:

Replies are listed 'Best First'.
Re^2: em and en dash problem
by sanku (Beadle) on Oct 26, 2010 at 07:34 UTC
    hi, I have tried the same but i am not able to enter the char en and en dash. If i am trying to enter those chars it's displaying as dot. And the code which i have tried is:
    use charnames ':full'; /\N{EM DASH}/; use utf8; $a="."; if($a =~/\x{2014}/) { print "Found"; } else { print "Not Found"; }
    Thanks
      Are you using a utf-8-capable editor? Is the editor using a utf-8-capable font?
        hi, I don't know. But i am using normal vi editor of Linux Os. How to check weather a editor is utf-8 char or not. Thanks
      You can use \x and \N in double-quoted literals too, if you donj't want to struggle with your editor.