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
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
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++)
>
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]=
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