From: James Edward Gray II Date: 2005-03-21T12:51:43+09:00 Subject: Re: equivalent idiom for ruby " perl -pe 's/(\d+)/localtime($1)/e'" On Mar 20, 2005, at 9:14 PM, Pe�a, Botp wrote: > Hi, > > forgive my perl ignorance, but how do you convert the ff perl idiom to > ruby(way): > > perl -pe 's/(\d+)/localtime($1)/e' /var/log/squid/access.log ruby -pe 'gsub!(/\d+/) { |t| Time.at(t.to_i) }' /var/log/squid/access.log I think. James Edward Gray II