Chap. 6: Hashes 1. How does Perl 6 store any number of values indexed by name rather than index? * [Assume: hashes] 2. What are the parts of a P6 hash element called? * [Assume: keys and values] * Are the keys of a P6 hash always converted to strings? * Are the keys of a P6 hash always unique? * Under what circumstances are the values of a P6 hash unique? 3. Is there any consistent order to the elements in a P6 hash? 4. Does the implementation of a P6 hash slow down as the number of elements increases? 5. How are the elements of a P6 hash accessed? 6. Do P6 hash elements spring into existence upon assignment? * Under what other circumstances are they created? * Can a P6 hash element exist without having a defined value? * How does P6 represent undefinedness? 7. Can P6 hashes be converted to lists, and back again into hashes? * How would I create one hash from another where the values of the first would be the keys of the second, and vice versa? * What would happen in that case if two elements in the first hash had the same value? * Does P6 have any operator which easily distinguishes hash keys from hash values? 8. How are the keys of a P6 hash accessed? 9. How are the values of a P6 hash accessed? 10. How can the number of elements in a P6 hash be determined quickly? 11. How do I iterate over the elements of a P6 hash? * How do I iterate over the elements of a P6 hash in a particular sorting order? 12. How can I determine whether a particular key exists in a given hash? 13. How can I remove a particular element from a P6 hash? 14. Can I use string interpolation to identify the key of a P6 hash element? Exercises: Learning Perl, 4th ed., p. 99 # vim: textwidth=100: