There you're creating an anonymous hash, populating it with the list and dereferencing the result, simple as that!sub remap_anon { return {qw( THIS THAT BLACK WHITE TALL SHORT )}->{$_[0]}; }
_________
broquaint
In reply to Re: Coercing an array into a hash
by broquaint
in thread Coercing an array into a hash
by grinder
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |