www.fromthevalley.com.au

Capitilise First Letter

This is how you capitalise the first letter in each word in perl:

 

my $v = 'hello mate';

$v = lc($v);
$v =~ s/\b(\w)/\u$1/g;

 

Very very handy when you need to do validation.

HOMEAJAXAPACHEBizphoneCSSDNSGeneralGraphicsHTMLHardwareJavascriptLinuxMACMS SQLMailMicrosoftOFFICE 365PerlPostgresSEOSocial MediaVMwareWindows 10