Philip Mak <pmak / aaanime.net> 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 <FILE>;
> close(FILE);
> 
> Can I do something like:
> 
> stdout << File.new("filename.txt");
> 
> or something?

IO.foreach("filename.txt") {|x| print x }