>> 4 while line = STDIN.gets > Ok, so I'm a noob trying to learn something here... > > Shouldn't line 4 be presented with a double = (==) since you're trying > do something while line == STDIN.gets? No, the assignment of line = STDIN.gets happens first which reads up to a '\n' including it. While then loops while this value is true. When there is no more inmput, line will be assigned nothing which is false and the loop ends. This works identically to other languages like perl/python/php -- ------------------------------------------------------------------------ Philip M. Gollucci (pgollucci / p6m7g8.com) 323.219.4708 Consultant / http://p6m7g8.net/Resume/resume.shtml Senior Software Engineer - TicketMaster - http://ticketmaster.com 1024D/EC88A0BF 0DE5 C55C 6BF3 B235 2DAB B89E 1324 9B4F EC88 A0BF Work like you don't need the money, love like you'll never get hurt, and dance like nobody's watching.