You have the following commands also:
uc Upper Case all within variable
ucfirst Upper case first character
lc Lower case whole variable
lcfirst Lower case first character
example:
my $MyVar = 'george';
printf "%-s\n", uc($MyVar);
printf "%-s\n", ucfirst($MyVar);
Output:
GEORGE
George
Wags ;)
-----Original Message-----
From: Salvador Lopez [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 26, 2001 21:15
To: [EMAIL PROTECTED]
Subject: regular expressions
Hello All,
how can i convert only the first letter of each word
in a string without changing any other characters?
Is this a job for regular expressions?
For example, convert:
FROM: "hello world. goodbye cruel world"
TO: "Hello World. Goodbye Cruel World"
any help is appreciated.
--sal
__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]