From: Stefan Gremm Date: 2008-03-24T23:51:35+09:00 Subject: $stdin Hello, first excuse me my bad english. i have write a little send_mail script. now i pipe the messagetext from another program, like cat /var/mailtext| send-mail.rb the program source: smtp_message = "" temp = $stdin temp.each do |f| smtp_message += f end this is runing very well, but when no text is in the pipe, the program is waiting for input. my question is, how can i ask, if text in $stdin, without the program is waitung for input. ciao Stefan -- ==================================================================== Stefan Gremm, Trebur, Germany Key fingerprint = BBBD 6645 F8B4 FE73 22FC D2F4 B4E6 5B48 60A2 82D9 ====================================================================