weird it is working for me....

>touch 1
#create empty file

>cat 1| 2.rb
: undefined method `each' for nil:NilClass (NoMethodError)

>cat 1| ruby -n 2.rb
>#No errors


You need to specify the -n option.


#############
>cat 2.rb
smtp_message = ""

$_.each do |f|
    smtp_message += f
end
p smtp_message
-- 
Posted via http://www.ruby-forum.com/.