Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Depending on your exact problem, this could be more complicated than you think and a simple regex might not work. Have you thought about capitalization inside the word? What if the word starts with punctuation like '...Word'? Are there any exceptions? What about international characters? </p> <p>It might be better to use a CPAN module like <a href="http://search.cpan.org/~dconway/Text-Autoformat-v1.14.0/lib/Text/Autoformat.pm" rel="noreferrer">Text::Autoformat</a> or <a href="http://search.cpan.org/~doom/Text-Capitalize-0.5/Capitalize.pm" rel="noreferrer">Text::Capitalize</a> where these problems have already been solved. </p> <pre><code>use Text::Capitalize 0.2; print capitalize_title($t), "\n"; use Text::Autoformat; print autoformat{case =&gt; "highlight", right=&gt;length($t)}, $t; </code></pre> <p>It sounds like Text::Autoformat might be more "standard" and I would try that first. Its written by <a href="http://en.wikipedia.org/wiki/Damian_Conway" rel="noreferrer">Damian</a>. But Text::Capitalize does a few things that Text::Autoformat doesn't. Here is a <a href="http://search.cpan.org/~doom/Text-Capitalize-0.5/Capitalize.pm#Comparison_to_Text::Autoformat" rel="noreferrer">comparison</a>. </p> <p>You can also check out the <a href="http://books.google.com/books?id=hP4IRp8xwTkC&amp;pg=PA31&amp;vq=properly+capitalizing+a+title+or+headline&amp;dq=perl+cookbook&amp;source=gbs_search_s&amp;cad=0" rel="noreferrer">Perl Cookbook</a> for recipie 1.14 (page 31) on how to use regexps to properly capitalize a title or headline.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload