in reply to y/·/./ gives two points instead of one

You think you have

$_ = '·|·'; print y/·/./r, "\n"; print s/·/./gr, "\n";

but you actually have

$_ = '·|·'; print y/·/./r, "\n"; print s/·/./gr, "\n";

This is because you treated the file as UTF-8 when you viewed it, but you didn't tell Perl to do the same by adding use utf8;.

Replies are listed 'Best First'.
Re^2: y/·/./ gives two points instead of one
by rsFalse (Chaplain) on Nov 16, 2015 at 21:53 UTC
    Thanks for explanation!