From: Jason Sweat Date: 2005-03-21T14:17:32+09:00 Subject: Re: equivalent idiom for ruby " perl -pe 's/(\d+)/localtime($1)/e'" On Mon, 21 Mar 2005 14:04:10 +0900, Michael Campbell wrote: > > cat /var/log/squid/access.log | ruby -pe '$_.gsub!(/^(\d+)/, > > Time.at($1.to_i).to_s)' > > No need for "cat" there. Yes, I started from what Jim Freeze posted above, and switched to the "cat" style during testing of the Time stuff, never switched it back. I see that ruby -pe '$_.gsub!(/^(\d+)/, Time.at($1.to_i).to_s)' /var/log/squid/access.log works as well. Regards, Jason