in reply to Re: Replacing a character in a string
in thread Replacing a character in a string

or with substr

substr($s, 0, 1, uc(substr($s, 0, 1)));

or

substr($s, 0, 1) = uc(substr($s, 0, 1));

Replies are listed 'Best First'.
Re^3: Replacing a character in a string
by Tanktalus (Canon) on Nov 16, 2005 at 01:30 UTC

    As long as we're getting silly ...

    $s &= ~' ';
    (Warning: may not work for non-7-bit-ASCII letters such as accented characters, Cyrillic characters, or anything in EBCDIC. Or even any characters that aren't actually letters. But it is fun to do.)

      Cute :)