There's \u, which uppercases the next character. Most string
operations don't try to guess what tokenization means for you, because
often the real rules are a little more difficult than splitting on
whitespace. (As is case normalization in general. Two examples: "Van
der Graaf" (name), "There and Back Again" (title).)

On Tue, Aug 11, 2009 at 11:51 AM, Berler Chanan<[email protected]> wrote:
> Thanks it works great.
> PS: I wonder why there is not string modifier for this kind of case
> Like "\Umy text\L" where all letters become capital, same idea for "camel
> notation"
>
> Thanks
> Chanan
>
> -----Original Message-----
> From: [email protected] [mailto:[email protected]] On Behalf
> Of Gaal Yahas
> Sent: Tuesday, August 11, 2009 9:52 AM
> To: Perl in Israel
> Subject: Re: [Israel.pm] Looking for camel notation subroutine
>
> Camel notation usually refers to something without spaces, such as
> "HelloWorld".
>
> Does the ucfirst builtin help with whay you want to do?
>
> $_ = "hello world";
> print join " ", map { ucfirst } split;
>
> On Tue, Aug 11, 2009 at 11:33 AM, Berler Chanan<[email protected]>
> wrote:
>> Hi All,
>>
>> I wonder if there is a way to change text into camel notation style.
>> Example: "hello world" should be "Hello World"
>>
>> Thanks
>> Chanan
>>
>> _______________________________________________
>> Perl mailing list
>> [email protected]
>> http://mail.perl.org.il/mailman/listinfo/perl
>>
>
>
>
> --
> Gaal Yahas <[email protected]>
> http://gaal.livejournal.com/
> _______________________________________________
> Perl mailing list
> [email protected]
> http://mail.perl.org.il/mailman/listinfo/perl
> No virus found in this incoming message.
> Checked by AVG - www.avg.com
> Version: 8.5.392 / Virus Database: 270.13.35/2271 - Release Date: 08/10/09
> 18:19:00
>
> _______________________________________________
> Perl mailing list
> [email protected]
> http://mail.perl.org.il/mailman/listinfo/perl
>



-- 
Gaal Yahas <[email protected]>
http://gaal.livejournal.com/
_______________________________________________
Perl mailing list
[email protected]
http://mail.perl.org.il/mailman/listinfo/perl

Reply via email to