From: ngoc Date: 2005-08-11T04:46:10+09:00 Subject: anonym variable $_ and foreach similar in Ruby ? Hi In perl print $_, "\n" foreach (@array); In Ruby array.each { |e| print e, "\n" } or array.each do |e| print e, "\n" end So |e| is similar to $_. But I can not say { |e| print e, "\n"} array.each because of block as argument and OO issue. In addition, it looks a little bit complicated in Ruby. I think in THIS CASE perl is more elegant than Ruby? Is it a right thinking (IN THIS CASE)? Are there other ways than those two array.each? (I am not very knowledgeable guy). Thanks ngoc