From: Gregory Brown Date: 2008-08-26T15:55:26+09:00 Subject: Re: how this will look in ruby? On Tue, Aug 26, 2008 at 2:45 AM, adm wrote: > sorry for asking conversion and not doing it myself(since I've little > to none knowledge of Ruby). > Can somebody translate this code snippent in Ruby? > > sub formatfld { > my $f = shift; > join('', map(ucfirst, split('_', $f))); > } def format(string) string.split(/_/).map { |e| e.capitalize }.join end -- Technical Blaag at: http://blog.majesticseacreature.com | Non-tech stuff at: http://metametta.blogspot.com