From: Todd Benson Date: 2009-04-09T01:47:43+09:00 Subject: Re: Beginner 'How-to' Question on getting Array info On Tue, Apr 7, 2009 at 6:53 PM, Nouman Saleem wrote: > thanks for taking the time to help Michael, this works great. Now time > to break it down and see how you did it :) > > thanks again! Here's one for you that uses some other methods... puts "What are the kids' names?" puts( gets.chomp.split.map {|n| "Hi #{n}"}.join(", ") ) ... basically, #split method builds array, #map changes prepends each element with "Hi ", and #join builds a string separating each element with ", ". This assumes the user doesn't use commas to separate names. If they do, you can split on commas with split(","), or use regular expressions. Todd