(The obvious -- but wrong -- "clean" way gives %nums the keys 'FIRST', 'SECOND', 'FIFTH' instead of 1, 2, 5.) I know it's not World Peace, but is there a neater way to accomplish the hash assignment?use constant FIRST => 1; use constant SECOND => 2; use constant FIFTH => 5; %nums = ( @{[FIRST]} => 'Ein', @{[SECOND]} => 'Zwei', @{[FIFTH]} => 'Funf' ); print keys %nums
Thanks.
In reply to Ugly syntax by Dr. Mu
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |