use charnames ':full'; ... print (charnames::viacode( ord($ch))); # EM DASH