From: Rodrigo Bermejo Date: 2008-03-25T05:44:56+09:00 Subject: Re: $stdin 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/.