From: Daniel Carrera Date: 2004-01-26T08:16:01+09:00 Subject: Re: Regurgitating the contents of a file On Mon, Jan 26, 2004 at 08:07:46AM +0900, Philip Mak wrote: > What's the shortest way to regurgitate the contents of a file? I mean > like this: > > # Perl code > open(FILE, "filename.txt"); > print while ; > close(FILE); > > Can I do something like: > > stdout << File.new("filename.txt"); > > or something? puts File.open("filename.txt").to_a Cheers, -- Daniel Carrera | No trees were harmed in the generation of this e-mail. PhD student. | A significant number of electrons were, however, severely Math Dept. UMD | inconvenienced.