# cat custom-name.pl; perl custom-name.pl use strict; use warnings; use Data::Dump qw[dump]; BEGIN { my $char = ord( q[a] ); my %hash = map { $_ => $char++ } qw[ aey bee ]; print dump( %hash ), qq[\n]; use v5.16; require charnames or die $@; charnames->import( q[:alias] => { %hash, q[cea] => $char } ); } printf qq[aey: %s\ncea: %s\n], qq[\N{aey}], qq[\N{cea}] ; ("bee", 98, "aey", 97) aey: a cea: c