From: don Date: 2006-11-04T13:40:04+09:00 Subject: Re: Accessing a hash -- Beginner On 2006-11-03, dblack@wobblini.net wrote: > > Do you want to set a hash key, or retrieve a value using an existing > key? For example: > > test = { "one" => 1, "two" => 2 } > hash_key = gets.chomp > puts test[hash_key] > > If you input "one", the program will print 1. > > I want to access the hash, then print part of the contents. I am going to restate my problem -- hopefully a little clearer -- later. Thanks for the response, David. Don