develooper Front page | perl.beginners | Postings from April 2003

lcfirst not returning correctly

Thread Next
From:
Kevin Old
Date:
April 25, 2003 09:20
Subject:
lcfirst not returning correctly
Message ID:
1051287388.2998.65.camel@localhost.localdomain
Hello everyone,

I'm trying to use lcfirst to return the first character in my string as
lowercase.  

What I'm doing:

$title = 'Godzilla';

$lctitle = lcfirst $title;

If I print $lctitle, it should be "g", but it prints "godzilla".  Any
ideas why?

If I have multiple words it does this:

$title = 'Star Wars';
$lctitle = lcfirst $title;

This code prints "star Wars".

Any ideas?

Thanks,
Kevin


-- 
Kevin Old <kold@carolina.rr.com>


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About