Hashes can be operated on and accessed as a whole as well as one
element at a time.
Translating (assigning) from a hash to an array gives a sequence
of pairs of entries, each pair consisting of the key and the
value.
Obviously there will always be an even number of entries in this
resulting list (array).
It works going back the other way as well. Assigning a list
(array) to a hash uses the even number elements as keys for the
corresponding odd number values.
The order that the pairs appear in this list cannot be
controlled. Likewise, the physical order in which hash key value
pairs are stored cannot be controlled.
Example:
$Results{"Bill"} = 1000;
$Results{"Bob"} = "forfeit";
$Results{"Betty"} = 6000;
@Holder = %Results; # Holder now (Bill, 1000, Bob, forfeit, Betty, 6000)
%Results = @Holder; # Hash restored to exact original state
Warning! If you go from an array back to a hash, and two scalars
end up with identical keys, only one hash entry will be created, and
successive occurrences of the same key will result in overwrites of the
scalar stored with that key.