Thanks for the all of the responses. Okay, the script is only meant for ONE person to tell ONE other person about the site. If they entered mr. blah blah, I would like it to look like: Mr. Blah Blah.

Thanks to SuperCruncher, I have gotten the "From:" name field to have all uppercase first characters, but can't get the same to happen for the "To:" name field to do the same. I know it has something to do with the $_ variable (I think?)

# make the first letters of the NAME of the sender uppercase my @from = split(/ /, $from); $_ = ucfirst for @from; # make the first letters of the NAME of the receiver uppercase my @to = split(/ /, $to); $_ = ucfirst for @to; # make the first letter of the message upper case $message = ucfirst($message);

As for using a regex for the next part, I am lost :(
How can I use this line: $string .= '.' if $string !~ /[.!?]$/; in the code below?

############################################## # puts a period at the end of senders message, # if one was not there, AND, if there is no # question OR explanation mark. my $length = length($message); my $period = index($message, "."); my $question = index($message, "?"); my $explanation = index($message, "!"); $length = $length - 1; if (($period ne $length) && ($question ne $length) && ($explanation ne + $length)) { $message = $message.'.'; } ##############################################

In reply to Re: making first letter of all words in array upper case by Anonymous Monk
in thread making first letter of all words in array upper case by iamrobj

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.