David Gilden wrote:

> 
> $key ="Departure date";
> 
> $key =~ s/([\w\w+])/\u$1/;
> 
> 
> ---> Desired result:
> 
> Departure Date
> 
> What is wrong the above regrex?


it's probably easier to use the ucfirst() function:

my $key ="Departure date";
my @result = map { ucfirst } split /\s+/, $key;
print join " ", @result, "\n";

this prints

Departure Date


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

Reply via email to