------------------------------------------------
On Wed, 23 Jul 2003 21:58:52 +0500, "Sara" <[EMAIL PROTECTED]> wrote:

> $TS = "THIS INPUT IS IN ALL CAPS";
> 
> $TS_cont = lc $TS;
> 
> $TS now prints out "this input is in all caps"
> 
> What If I want first letter in caps for every word in string? which should be "This 
> Input Is In All Caps"
> 

Well TMTOWTDI, and this way results in a little data loss and definitely will *NOT* 
win any beauty contests. If you are trying to maintain a non-sane delimiter you will 
need to resort to other methods....

my $TS = "THIS INPUT IS IN ALL CAPS";
print join(" ", map { $_ = ucfirst(lc($_)) } split(/\s+/, $TS));

http://danconia.org

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to