Home > PHP, Perl > Perl Version of PHP’s “ucwords” Function

Perl Version of PHP’s “ucwords” Function

December 15th, 2009 Masao Leave a comment Go to comments
my $string = 'this is a string of text';
$string =~ s/\b(\w+)\b/ucfirst($1)/ge;
print "$string\n";
Categories: PHP, Perl Tags:
  1. eunice
    January 12th, 2010 at 14:53 | #1

    hi! muxtah?

  1. No trackbacks yet.