From: gedb@... (Ged) Date: 2004-01-27T02:04:54+09:00 Subject: Re: Regurgitating the contents of a file Philip Mak wrote in message news:<20040125230811.GG5772@lina.aaanime.net>... > 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? IO.foreach("filename.txt") {|x| print x }