in reply to Coercing an array into a hash

A third way,

{ my $remap = { qw( THIS THAT BLACK WHITE TALL SHORT ) }; sub remap_closure { exists $remap->{ $_[0] } ? $remap->{ $_[0] } : undef; } }
By checking for existence, the hash does not keep growing new undefined keys as possibles are tried. That is not a problem with the others since each invocation gets a new hash with them.

After Compline,
Zaxo