When you reverse the list you get from a hash, keys and values are exchanged. Making a hash from the reversed list, if two values are the same, only one of the previous keys will survive as a value.
Added - I get 'w2' running your first example, but get the same as you with the second. There may be some optimization with aliases going wrong. I don't see that the construction is supposed to be undefined.
After Compline,
Zaxo
In reply to Re: whats wrong reverse %x = reverse %h?
by Zaxo
in thread whats wrong reverse %x = reverse %h?
by borisz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |