From: tony summerfelt Date: 2006-08-14T21:05:12+09:00 Subject: Re: ruby equiv of perl pos On Mon, 14 Aug 2006 14:20:10 +0900, you wrote: >> new_string = "" >> string.scan(/\0/) do |m| >> new_string = "%o" % $~.offset(0).first >> end >That should work okay i noticed that all the ruby solutions presented were longer than the original perl code. i found the perl code more readable... which is unusual for most perl-ruby comparisons :) http://home.cogeco.ca/~tsummerfelt1 ROVING SWARM: http://groups.yahoo.com/group/roving_swarm/ telnet://ventedspleen.dyndns.org