[ returns a hash slice, a sub hash with only the defined keys.
[[ returns a one or more values.
Details
These are the hash accessor methods. They closely follow an R style.
$ is a single value look-up operator. It returns the value for the
supplied key. The key name must be literal and will not be interpreted.
[[ is the look-up, extraction operator. It returns the values of
one keys. The key names will be interpreted. If you wish to extract
multiple keys, use the [ accessor.
[ is a subseting operator. It returns a (sub) hash with the specified
keys. All other keys are removed.