From: Zachary Holt Date: 2007-06-07T10:52:00+09:00 Subject: Re: Globals not incrementing inside block Hi, On Jun 6, 2007, at 6:34 PM, Todd A. Jacobs wrote: > I have the following snippet: > > at_exit do > $total_count, $daily_count = 0, 0 > IO.foreach(my_logfile) do |line| > $total_count.next You're not storing the new value $total_count = $total_count.next or $total_count += 1 Also, you don't need globals to do what you're trying to do.