Hello all,
The tag below using to convert any capital letter to small letter, but how to make any starting word automatically convert to capital letter, for example the word 'post new message' to 'Post New Message'.
Please help...
Description_Filter =>
sub {
my $tags = shift;
my $description = $tags->{Description};
$description = GT::CGI::html_escape($description);
$description =~ s/A/a/g;
$description =~ s/B/b/g;
$description =~ s/C/c/g;
$description =~ s/D/d/g;
$description =~ s/E/e/g;
$description =~ s/F/f/g;
$description =~ s/G/g/g;
$description =~ s/H/h/g;
$description =~ s/I/i/g;
$description =~ s/J/j/g;
$description =~ s/K/k/g;
$description =~ s/L/l/g;
$description =~ s/M/m/g;
$description =~ s/N/n/g;
$description =~ s/O/o/g;
$description =~ s/P/p/g;
$description =~ s/Q/q/g;
$description =~ s/R/r/g;
$description =~ s/S/s/g;
$description =~ s/T/t/g;
$description =~ s/U/u/g;
$description =~ s/V/v/g;
$description =~ s/W/w/g;
$description =~ s/X/x/g;
$description =~ s/Y/y/g;
$description =~ s/Z/z/g;
return $description;
}
The tag below using to convert any capital letter to small letter, but how to make any starting word automatically convert to capital letter, for example the word 'post new message' to 'Post New Message'.
Please help...
Description_Filter =>
sub {
my $tags = shift;
my $description = $tags->{Description};
$description = GT::CGI::html_escape($description);
$description =~ s/A/a/g;
$description =~ s/B/b/g;
$description =~ s/C/c/g;
$description =~ s/D/d/g;
$description =~ s/E/e/g;
$description =~ s/F/f/g;
$description =~ s/G/g/g;
$description =~ s/H/h/g;
$description =~ s/I/i/g;
$description =~ s/J/j/g;
$description =~ s/K/k/g;
$description =~ s/L/l/g;
$description =~ s/M/m/g;
$description =~ s/N/n/g;
$description =~ s/O/o/g;
$description =~ s/P/p/g;
$description =~ s/Q/q/g;
$description =~ s/R/r/g;
$description =~ s/S/s/g;
$description =~ s/T/t/g;
$description =~ s/U/u/g;
$description =~ s/V/v/g;
$description =~ s/W/w/g;
$description =~ s/X/x/g;
$description =~ s/Y/y/g;
$description =~ s/Z/z/g;
return $description;
}