Re: Capatalisation Question

2005-04-20 Thread John W. Krahn
N. Ganesh Babu wrote: Dear All Hello, I want to do capitalisation of this text. I am using the following code. It works fine with all other lines. $line="Level A (Grade 1 reading level)"; @words=split(/ /,$line); for($i=0;$i<=$#words;$i++) { $words[$i]=~s!($words[$i])!\u\L$1!gi; pr

Re: Capatalisation Question

2005-04-18 Thread Offer Kaye
On 4/18/05, Jay Savage wrote: > > $line =~ /(\S+)/\u\L$1/g ; > Almost right - returns "Level A (grade 1 Reading Level)" - notice the lowercase "g" in "grade"). Should be: $line =~ s/(\w+)/\u$1/g; -- Offer Kaye -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAI

Re: Capatalisation Question

2005-04-18 Thread Jay Savage
On 4/18/05, N. Ganesh Babu <[EMAIL PROTECTED]> wrote: > Dear All > > I want to do capitalisation of this text. I am using the following code. > It works fine with all other lines. > > $line="Level A (Grade 1 reading level)"; > > @words=split(/ /,$line); > for($i=0;$i<=$#words;$i++) >

Re: Capatalisation Question

2005-04-18 Thread Offer Kaye
On 4/18/05, N. Ganesh Babu wrote: > Dear All > > I want to do capitalisation of this text. I am using the following code. > It works fine with all other lines. > > $line="Level A (Grade 1 reading level)"; > > @words=split(/ /,$line); > for($i=0;$i<=$#words;$i++) > { > $words[$i]=

Re: Capatalisation Question

2005-04-18 Thread N. Ganesh Babu
Dear All, The output I want is "Level A (Grade 1 Reading Level)" Regards, Ganesh N. Ganesh Babu wrote: Dear All I want to do capitalisation of this text. I am using the following code. It works fine with all other lines. $line="Level A (Grade 1 reading level)"; @words=split(/ /,$line); for