From: ara.t.howard@... Date: 2006-09-07T01:30:02+09:00 Subject: Re: Ruby Newbie - array/hash help On Thu, 7 Sep 2006, William Crawford wrote: > William Carpin wrote: >> Given the following code... >> >> >> my $ds = new DataSources($dbh); >> my $data_sources = $ds->getTableNames(); >> >> foreach my $table_name (keys %{$data_sources}){ >> ...some code... >> } >> >> >> Is there any effective way to reproduce the above foreach loop in Ruby? >> I've been doing research, but I can't make heads or tails of it. Any >> assistance would be greatly appreciated. > > Wouldn't that just be: > > data_sources.each_key do |table_name| > puts table_name > end puts data_sources.keys ;-) -a -- what science finds to be nonexistent, we must accept as nonexistent; but what science merely does not find is a completely different matter... it is quite clear that there are many, many mysterious things. - h.h. the 14th dalai lama