From: Florian Gross Date: 2004-10-02T18:10:03+09:00 Subject: Re: [QUIZ] Secret Santas (#2) Gavin Kistner wrote: >> Your script will be fed a list of names on STDIN. > I've never worked with STDIN before; does this mean a single call to > #gets will return a newline-delimited list of names, or I should loop > calls to #gets until it returns nil? STDIN and ARGF are both IOs. STDIN reads from the standard input. ARGF reads from the standard input and file names that are in ARGV. IO#gets returns one line with a \n at the end or nil when there are no more lines available. There's also IO#read which returns the whole file as a String and IO#readlines which returns the whole file as an Array of lines. (Each with a \n at the end.) Regards, Florian Gross