From: Jim Freeze Date: 2005-03-21T12:41:33+09:00 Subject: Re: equivalent idiom for ruby " perl -pe 's/(\d+)/localtime($1)/e'" * "Pe�a, Botp" [2005-03-21 12:14:31 +0900]: > 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 I think it would be ruby -pe '$_.gsub!(/(\d+)/, Time.local("\\1".to_i).to_s)' /var..access.log -- Jim Freeze Code Red. Code Ruby