Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

how to replace the first letter of a word to capital letter??
monday -> Monday

Replies are listed 'Best First'.
Re: upper case letter
by haoess (Curate) on May 11, 2004 at 05:26 UTC
    print ucfirst "monday"; # or: print "\umonday";

    Please have a look at your perl documentation, that's a very simple question ...

    -- Frank

Re: upper case letter
by davido (Cardinal) on May 11, 2004 at 05:33 UTC
    my $day = "monday"; $day = ucfirst $day; print "$day\n";

    See ucfirst for details.


    Dave

Re: upper case letter
by ysth (Canon) on May 11, 2004 at 05:36 UTC
    $day = "monday"; $day = ucfirst $day; print $day;
Re: upper case letter
by Juerd (Abbot) on May 11, 2004 at 07:10 UTC

    how to replace the first letter of a word to capital letter??

    Learn Perl and RTFM.

    Juerd # { site => 'juerd.nl', plp_site => 'plp.juerd.nl', do_not_use => 'spamtrap' }