Perl: UPPER CASE -> lower case

Cheetah8799

Diamond Member
Apr 12, 2001
4,508
0
76
yep, easy. once I opened a book...

$big = uc($little);

$little = lc($big);

got it? good. :) I knew these Perl books would come in handy some day...
 

Cheetah8799

Diamond Member
Apr 12, 2001
4,508
0
76
oh, and there's more. :)

This will do the same as the uc() and lc() functions. All chars go up or down.
$big = "\U$little";
$little = "\L$big";

These will do just the first char of the string I think.
$big = "\u$little";
$little = "\l$big";


There's more, but like 2 pages. I'm reading it out of the O'Reilly Perl Cookbook 2nd Edition. Page 29.
 

Armitage

Banned
Feb 23, 2001
8,086
0
0
Originally posted by: Cheetah8799
yep, easy. once I opened a book...

$big = uc($little);

$little = lc($big);

got it? good. :) I knew these Perl books would come in handy some day...

Thanks
I've got a perl book ... I did look. If I had known the function was called uc, I would have found it easily. But then, if I already knew it I wouldn't have to look! (I checked the index & TOC for string functions, uppercase, lowercase, toupper, tolower, etc.)
 

Cheetah8799

Diamond Member
Apr 12, 2001
4,508
0
76
ya, I looked in a generic Perl 21days type book and couldn't find it. The Perl Cookbook has a MUCH nicer index in the back.