Fields

Fields of hash are the keys, the value of which we get by referring to it:
$hash.key

Such a construction will return value associated with the key. If non-existing key is referred to, the value of key
_default will be returned, if specified.

Assigning something to hash key actually adds or updates a pair key/value in the hash:
$my_hash.key[value]

For better interchangeability of hashes and tables, field
fields contains reference to hash itself, see "Using hash instead of table".


Copyright © 1997–2010 Art. Lebedev Studio | http://www.artlebedev.com Last updated: 24.12.2004