From: Kane Williams Date: 2012-01-25T17:50:52+09:00 Subject: Print and puts. What inputs do they require? print while gets != "42\n" I saw this code snippet as the answer to the first question on codechef. How does print know to output what "gets" receives? I thought you required a string in the form of a variable or string literal in front of print. Also, when replacing print with puts how come it doesn't output the numbers any more? I know that puts adds a newline to the end of a string if it doesn't exist, but from the example above this doesn't seem to be the only difference. Sorry for the newbish questions but I would appreciate the help! Thanks. -- Posted via http://www.ruby-forum.com/.