2010/3/21 Jonathan Nielsen <jonathan / jmnet.us>:
>> arr = Dir.open("K:/test").entries
>> arr.each do |file|
>>  ¨Âéìå®ïðåî¨æéìå© äï üæäü
>>  do whatever you need with the file
>>  ¨Âîä
>> end
>>
>
> Wow, I typoed that bad, but I hope you get the idea. corrected above.)

If it is only for output purposes, we can actually do it in one line:

puts Dir["K:/test/*"].map {|f| File.read f}

Note: this is not necessarily efficient nor safe (just think of 3GB files...).

Kind regards

robert

-- 
remember.guy do |as, often| as.you_can - without end
http://blog.rubybestpractices.com/