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)));
}

thanks in advance.