Can be done without regular expression
my %repl = (c => 'center', l => 'left', r => 'right');
$tmp = join ' ', map { $repl{$_} } split '', $tmp;
split with a template ''splits the string into a list of its characters and map uses a hash to replace each with its full word. The output list mapis space-joined.
Updated for comments
If the source string contains more other characters, you can filter them first
$tmp = join ' ', map { $repl{$_} } grep { /c|l|r/ } split '', $tmp;
or, use an empty list in mapfor anything that is not defined in the hash
$tmp = join ' ', map { $repl{$_} // () } split '', $tmp;
, c|l|r.
$tmp = join ' ', map { $repl{$_} // $_ } split '', $tmp;
. , .