in reply to Re: transliteration d flag not working as expected
in thread transliteration d flag not working as expected
You could also do it with a single s/// substitution, although it is messier and almost certainly slower than a double-tr/// approach:
>perl -wMstrict -le "my %xlate = qw(t f h l i i s p); ;; my $s = 'alters'; $s =~ s{ . }{ $xlate{${^MATCH}} // '' }xmsgpe; print qq{'$s'}; " 'fp'
In Section
Seekers of Perl Wisdom