http://qs321.pair.com?node_id=11101521


in reply to Re^3: Special character not being captured
in thread Special character not being captured

right, UTF-8 input wasn't decoded, string of octets passed to first_alpha, 1st octet i.e. \xC3 was returned and should have become hash key, but somehow it is Replacement Character. But then, dump as shown (hash of arrays) can not be alpha_hash output, so it's not really SSCE, can only guess.

Replies are listed 'Best First'.
Re^5: Special character not being captured
by choroba (Cardinal) on Jun 18, 2019 at 13:17 UTC
    It might be the terminal who changes the character into the replacement one:
    $ perl -wE '%h = ("\xc3" => 1); say $_, ord for keys %h'
    �195
    
    map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]