From: "semmons99@..." Date: 2006-03-25T01:43:53+09:00 Subject: Console IO Is there a simpler way to do the following? Person = Struct.new( :first_name, :last_name ) print "Enter first name: " first_name = gets.chomp.capitalize print "Enter last name: " last_name = gets.chomp.capitalize p = Person.new( first_name, last_name ) printf "Hello %s %s.\n", p.first_name, p.last_name My idea was to create a function the prints a message and then takes console output. What I want to do is not have to create the extra objects for first and last name. Below is the solution I can up with. def pgets( msg ) print msg gets end Person = Struct.new( :first_name, :last_name ) p = Person.new( pgets( "Enter first name: " ).chomp.capitalize, pgets( "Enter last name: " ).chomp.capitalize ) printf "Hello %s %s.\n", p.first_name, p.last_name Thanks, Shane